RETRIEVE ALL WHITE-LISTED CONNECTION TYPES
In order retrieve all white-listed Connection types on any particular stack, use the following:
curl -X GET \
https://ENDPOINT/api/connection-types/ \
-H "Authorization: Token TOKEN_VALUE"
The list can differ depending on how many Connection types have been white-listed for any individual stack.
Results (cropped to just two Connection types)
{
"count": XYZ,
"next": null,
"previous": null,
"results": [
{
"id": XYZ,
"name": "CONNECTION_NAME",
"slug": "CONNECTION_AUTHORIZATION",
"url": "https://YOUR.STACK.datatap.adverity.com/api/connection-types/ID/",
"connections": "https://YOUR.STACK.datatap.adverity.com/api/connection-types/ID/connections/"
},
{
"id": XYZ,
"name": "CONNECTION_NAME",
"slug": "CONNECTION_AUTHORIZATION",
"url": "https://YOUR_STACK.datatap.adverity.com/api/connection-types/ID/",
"connections": "https://YOUR_STACK.datatap.adverity.com/api/connection-types/ID/connections/"
}
]
}
LIST CONNECTIONS PER TYPE
Use the Connection type ID, e.g. 123 to retrieve all connections of this type.
curl -H
https://ENDPOINT/api/connection-types/123/connections/
-H "Authorization: Token TOKEN_VALUE"
SEARCH FOR CONNECTIONS
To search for available Connection types, instead of paging through all possible options, use the SEARCH parameter:
curl -X GET \
https://YOUR_STACK.datatap.adverity.com/api/connection-types/?search=CONNECTION_NAME\
-H 'Authorization: Token TOKEN_VALUE' \
Result (Cropped for one return)
{
"count": XYZ,
"next": null,
"previous": null,
"results": [
{
"id": "CONNECTION_ID",
"name": "CONNECTION_NAME"
"slug": "CONNECTION_AUTHORIZATION",
"url": "https://YOUR_STACK.datatap.adverity.com/api/connection-types/CONNECTION_ID/",
"connections": "https://YOUR_STACK.datatap.adverity.com/api/connection-types/CONNECTION_ID/connections/"
}
]
}
UPDATE A CONNECTION TOKEN
curl -X PATCH \
https://ENDPOINT/api/connection-types/CONNECTION_TYPE_ID/connections/CONNECTION_ID/token/
-H "Authorization: Token TOKEN_VALUE" \
-H 'Content-Type: application/json' \
-d access_token=SYSTEM_GENERATED_TOKEN \
Comments
0 comments
Article is closed for comments.