API endpoints allow you to create, update and delete managed sources, add or remove individual resources or access tokens, and pause or restart existing sources.
Creating and consuming data from a source
To consume data using a managed source:
Before you can consume data from a managed source you need to agree to the license agreement for the source.
Go to your dashboard and select the managed source you'd like to use. Agree to the license agreement.
Create a source using /source/create.
You will need to provide your DataSift credentials as well as a list of resources to monitor and credentials specific to a particular data source. A new Managed Source is available as soon as you create it.
Options available for each source are detailed on the /source/create endpoint page.
Make a note of the id returned by /source/create.
Reference the source instance in a filter.
You can use the source.id target to filter for data specific to that source:
source.id == "2bd73078a7cb430769a1c128025d7c7f"
or the interaction.type target for data specific to a source type:
interaction.type == "facebook_page"
Start consuming the output of the filter.
You must begin to consume the output before you hit /source/start to start your Managed Source. When you start the source, it sends a backlog of interactions in a burst before it starts to send interactions in real time.
- Call /source/start to kick off your managed source.
Managing your source
Once your source is running you can manage the source as follows:
To check the status of your sources call /source/get and check the
statusfield for each source.
To update the settings for a source you can use the following endpoints:
To delete a source /source/delete.
- To check the health of a source call /source/log. This endpoint returns any errors logged by a source.