WHITE-LISTED DATASTREAM TYPES
In order retrieve all white-listed Datastream types on any particular stack, use the following:
curl -X GET \
https://YOUR_STACK.datatap.adverity.com/api/datastream-types/ \
-H 'Authorization: Token TOKEN_VALUE' \
The list can differ depending on how many Datastream types have been white listed for any individual stack.
Results (cropped to just one Datastream type: Google Ads),
{
"count": XYZ,
"next": "https://YOUR_STACK.datatap.adverity.com/api/datastream-types/?page=XZ",
"previous": null,
"results": [
{
"id": 123,
"name": "DATASTREAM_NAME",
"slug": "DATASTREAM_AUTHORIZATION",
"url": "https://YOUR_STACK.datatap.adverity.com/api/datastream-types/123/",
"datastreams": "https://YOUR_STACK.datatap.adverity.com/api/datastream-types/123/datastreams/",
"create_url": "https://YOUR_STACK.datatap.adverity.com/core/apidatastream/add/?ct_id=123",
"logo_url": "https://YOUR_STACK.datatap.adverity.com/static/images/api/logo.svg"
}
]
}
Use the Datastream type ID, e.g. 123 to retrieve all current streams of this type.
curl -X GET \
https://YOUR_STACK.adverity.com/api/datastream-types/123/datastreams/ \
-H 'Authorization: Token TOKEN_VALUE' \
SEARCH FOR DATASTREAM TYPES
To search for available Datastream types, instead of paging through all possible options, use the SEARCH parameter:
curl -X SEARCH \
https://YOUR_STACK.datatap.adverity.com/api/datastream-types/?search=DATASTREAM_NAME\
-H 'Authorization: Token TOKEN_VALUE' \
Result (Cropped for one return)
{
"count": XYZ,
"next": null,
"previous": null,
"results": [
{
"id": "DATASTREAM_ID",
"name": "DATASTREAM_NAME"
"slug": "DATASTREAM_AUTHORIZATION",
"url": "https://YOUR_STACK.datatap.adverity.com/api/datastream-types/DATASTREAM_ID/",
"datastreams": "https://YOUR_STACK.datatap.adverity.com/api/datastream-types/DATASTREAM_ID/datastreams/"
}
]
}
Comments
0 comments
Article is closed for comments.