Platform API / Site stream data sources Platform API Site stream data sources List, create, update, and delete Stream API data sources on a site using the Platform API.
FeedbackThe data source management endpoint lets you link Stream API streams to sites programmatically. You can create, update, delete, and inspect data source connections.
curl --header 'X-Auth-Token: value' \
--header 'Content-Type: application/json' \
--request GET 'https://platform-api.productsup.io/platform/v2/sites/1/streams'
{
"success" : true ,
"Sources" : [
{
"id" : 1 ,
"site_id" : 1 ,
"description" : "stream api" ,
"source" : "" ,
"import_type" : 1 ,
"import_id" : 331 ,
"status" : "active" ,
"settings" : [
"stream : 1"
]
}
],
"meta" : {
"cursor" : {
"current" : 0 ,
"prev" : 0 ,
"next" : 1 ,
"count" : 1
}
}
}
FeedbackGET https://platform-api.productsup.io/platform/v2/sites/<siteId>/streams
Field Type Description siteIdinteger Site identifier
Name Value Content-Typeapplication/json
Field Type Description idinteger Data source identifier site_idinteger Identifier of the site this data source belongs to descriptionstring Description of the data source statusstring See status values sourcestring URL of the data source import_typeinteger See import type values import_idinteger Import method identifier settingsarray All settings related to the data source
Value Description activeThe data source is fully operational pausedThe data source is paused and data is not imported
Value Description 1Main data feed 2Additional data feed
Code Message Details 200 — List returned successfully 401 Unauthorized Invalid authentication token 403 You don't have the rights to access this resource Insufficient permissions to access the site 404 The requested resource could not be found The site does not exist
curl --header 'X-Auth-Token: value' \
--header 'Content-Type: application/json' \
--request POST 'https://platform-api.productsup.io/platform/v2/sites/1/streams' \
--data-raw '{"import_type":1,"description":"stream api","stream_id":1,"status":"active"}'
{
"success" : true ,
"Sources" : [
{
"id" : 1 ,
"site_id" : 1 ,
"description" : "stream api" ,
"source" : "" ,
"import_type" : 1 ,
"import_id" : 331 ,
"status" : "active" ,
"settings" : [ "stream : 1" ]
}
]
}
FeedbackPOST https://platform-api.productsup.io/platform/v2/sites/<siteId>/streams
Field Type Description siteIdinteger Site identifier
Name Value Content-Typeapplication/json
Field Type Description stream_idinteger Stream identifier import_typeinteger See import type values . Defaults to 1. descriptionstring Description of the data source statusstring See status values . Defaults to active.
Code Message Details 201 — Data source created and linked to the site 401 Unauthorized Invalid authentication token 403 You don't have the rights to access this resource Insufficient permissions to access the site or stream 404 The requested resource could not be found The site or stream does not exist 422 The stream datasource for the site already exists The stream is already linked to this site
curl --header 'X-Auth-Token: value' \
--header 'Content-Type: application/json' \
--request PUT 'https://platform-api.productsup.io/platform/v2/sites/1/streams/1' \
--data-raw '{"import_type":1,"description":"stream api","status":"active"}'
FeedbackPUT https://platform-api.productsup.io/platform/v2/sites/<siteId>/streams/<streamId>
Field Type Description siteIdinteger Site identifier streamIdinteger Stream identifier
Name Value Content-Typeapplication/json
Code Message Details 200 — Data source updated successfully 401 Unauthorized Invalid authentication token 403 You don't have the rights to access this resource Insufficient permissions to access the site or stream 404 The requested resource could not be found The site or stream does not exist 422 The stream datasource for the site doesn't exist The stream is not linked to this site
curl --header 'X-Auth-Token: value' \
--header 'Content-Type: application/json' \
--request DELETE 'https://platform-api.productsup.io/platform/v2/sites/1/streams/1'
{
"success" : true ,
"message" : "Resource was deleted successfully!"
}
FeedbackDELETE https://platform-api.productsup.io/platform/v2/sites/<siteId>/streams/<streamId>
Field Type Description siteIdinteger Site identifier streamIdinteger Stream identifier
Name Value Content-Typeapplication/json
Field Type Description successboolean Indicates request status messagestring Confirmation message
Code Message Details 200 — Data source deleted successfully 401 Unauthorized Invalid authentication token 403 You don't have the rights to access this resource Insufficient permissions to access the site or stream 404 The requested resource could not be found The site or stream does not exist 422 The stream datasource for the site doesn't exist The stream is not linked to this site
← Previous Process Next → Rate limiting How is this guide?
Good Bad