Threads And Channels
Retrieve
Typically you will be retrieving a thread related to a specific resource. Because the thread has a predictable ID (the resource's ID prefixed with thrd_
), you'll typically just retrieve a single thread.
Channels on the other hand are not tied to a specific resource. Instead, you'll typically query the channel based on the third party subscribers on a resource.
Retrieve Thread
Get a single thread using its id
.
List Threads
Example
When you want to retrieve multiple threads, your data
property on the result will always be an array
even if you don't have any threads.
Pagination
If the has_more
property on the pagination object is set to true, you know there are more threads in the database that have not been returned to you. The pagination object also has a page
property indicating your current offset and a limit property. The total_count property in pagination returns the the total number of threads in the database.
By default the page
is set to 1
and the limit
is 25
.
If we want to query for deliveries 26 - 50, we would request page 2 with a query parameter.
Retrieve Channel
Get a single thread using its id
.
List Channels
Example
When you want to retrieve multiple threads, your data
property on the result will always be an array
even if you don't have any channels.
Find by subscribers
Sometimes you may want to find a channel by the subscribers on a resource. You can do this by passing in a subscriber_ids query parameter with all of the subscriber ids you want to find a channel for.
Typically, you'll only have one subscriber, and you do not need to include your own organization.
Pagination
If the has_more
property on the pagination object is set to true, you know there are more threads in the database that have not been returned to you. The pagination object also has a page
property indicating your current offset and a limit property. The total_count property in pagination returns the the total number of threads in the database.
By default the page
is set to 1
and the limit
is 25
.
If we want to query for deliveries 26 - 50, we would request page 2 with a query parameter.