Documentation
API documentation
Docs navigation
API navigation
Sources
Sources define what Posts should be pulled into a particular Feed. A Source is made up of a source_type
(e.g. Instagram Tag) and a value (called tag
) that's used to query the source type.
Methods
List Sources
Create Source
Update Source
Delete Source
List Sources
This endpoint lists all sources.
GET /sources
Request
GET /v1/sources
Response
[
{
"id": "d7de2fb2-a272-4c75-9e0a-ac9e89aee2b3",
"feed_id": "660b923a-a6e7-4540-bd03-7e08fd006e0d",
"source_type": 4,
"tag": "curator_io",
"status": 1,
"initialised": 1,
"error_count": 0,
"feed": {
"id": "660b923a-a6e7-4540-bd03-7e08fd006e0d",
"moderation": "post",
"name": "Default",
"colour_body_bg": "#efefef",
"colour_body_text": "#707070",
"colour_header_bg": "#efefef",
"colour_header_text": "#2B2B2B",
"public_key": "adfdad0b-88ea-4660-8fc5-6ab02741"
}
}
]
Params
Param | Description | Required |
---|---|---|
feed_id | Show sources for a particular Feed | No |
Create Source
This end point creates a Source for a Feed.
When a source is created the platform will request the latest 20 posts from the source.
The example below creates a source that pulls in Instagram posts with the hashtag #myawesometag.
POST /sources
Request
POST /v1/sources
{
"feed_id": "660b923a-a6e7-4540-bd03-7e08fd006e0d",
"source_type": 2,
"tag": "myawesometag"
}
Response
{
"id": "b37d3706-7fbd-4af9-a989-e8d20a50e04e",
"source_type": 2,
"tag": "myawesometag",
"status": 1,
"feed_id": "660b923a-a6e7-4540-bd03-7e08fd006e0d"
}
Params
Param_type | Description | Required |
---|---|---|
feed_id | Feed to assign source to | Yes |
source_type | Source Type to to pull posts from. See Source Type ID | Yes |
tag | Value to query source | Yes |
Update Source
Updates a Source.
Note: Once created a Sources feed_id
and source_type
can not be modified.
PUT /sources/SOURCE_ID
Request
PUT /v1/sources/SOURCE_ID
{
"tag": "curator_io"
}
Response
{
"id": "1301a1f9-4982-4101-8a2f-2bd4d98db41a",
"feed_id": "660b923a-a6e7-4540-bd03-7e08fd006e0d",
"source_type": 4,
"tag": "curator_io",
"status": 1,
"initialised": 1,
"error_count": 0
}
Params
Param | Description | Required |
---|---|---|
SOURCE_ID | Id of Source to update | Yes |
tag | Value to use when querying source | Yes |
Delete Source
Delete a source.
Note: Deleting a source will delete all the associated posts.
DELETE /sources/SOURCE_ID
Request
DELETE /v1/sources/SOURCE_ID
Response
{
"success": true,
"message": "Source deleted"
}
Params
Param | Description | Required |
---|---|---|
SOURCE_ID | Id of Source to delete | Yes |