Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member604434
Participant
0 Kudos
Connector Builder Guide – Add a REST Resource

Open Connectors consists of over 170 connectors to 3rd Party Applications natively embedded in the SAP ecosystem. If the Connector you need does not exist in the catalog, you can build it quickly with Connector Builder. This instruction guide will walk you through using this tool, with concrete examples throughout. The beginning, Part 1, can be found here.

 

When creating resources, you should have a Connector Instance first. If you reach this screen and need to create an Instance, just click the plus sign next to the left menu that says “Authenticate Instance.”  Now click Add a new resource.



Let’s build the contacts resources found in the Survey Monkey API.



Notice how we enter contacts in the vendor resource name. This, plus a /, will be appended to the Base URL that we entered on the Setup screen.

After clicking Go, you’ll see this screen. Let’s edit the GET /contacts resource by clicking on the pencil icon.



Expanding out the Configuration section, we’ll keep the Resource Type as API (click here for an explanation of other resource types) and add a Response Root Key named “data.”



This is because the response looks like this:
{
"per_page": 50,
"total": 2,
"data": [
{
"href": "https://api.surveymonkey.com/v3/contacts/2856836347",
"first_name": "John",
"last_name": "Doe",
"id": "2856836347",
"email": "test@surveymonkey.com"
},
{
"href": "https://api.surveymonkey.com/v3/contacts/2856850975",
"first_name": "Barbara",
"last_name": "Allen",
"id": "2856850975",
"email": "barbaraallen@fake.com"
}
],
"page": 1,
"links": {
"self": "https://api.surveymonkey.net/v3/contacts?page=1&per_page=50"
}
}

We only care about the objects in the data array because we are creating a normalized experience where the responses are all restful, and presented in a certain way. Adding a root key is your choice, however.

The three parameters (where, page, and pageSize) that you see above are the default parameters.

Looking back at the pagination query parameters in the API:



We see we have to map ‘page’ and ‘per_page’ to the Open Connectors normalized parameters of ‘page’ and ‘pageSize.’

Now we are ready to save the resource and try it out.



Press Execute to try out the resource:





Everything looks good. You can also click on Vendor Request to inspect what was actually sent to the vendor.

Finally, let’s utilize the default parameter “where.” This takes in filters and concatenates them together using modified SQL, or OCNQL. Let’s look at the filters offered by the API.


Let’s try the GET /contacts resource again, this time with some filters in the where clause:

Labels in this area