Difference between revisions of "API Channels List"

From unroole CMS wiki
Jump to: navigation, search
(Optional Paramaters)
(Optional Paramaters)
Line 50: Line 50:
 
| [[API Channel Fields]]
 
| [[API Channel Fields]]
 
| List of comma separated fields to be returned in the response.
 
| List of comma separated fields to be returned in the response.
 +
|-
 +
| page
 +
| 1
 +
| Depends on query
 +
| Integer
 +
| The current pages to display based on the limit.
 
|-
 
|-
 
| url_time_limit
 
| url_time_limit

Revision as of 09:50, 29 November 2013

Summary

Allows querying for a list of channels belonging to the account. The query is a wildcard search on:

  • name
  • type

URI

https://api.unroole.com/accounts/[account-id]/channels

HTTP Method

GET

Required Paramaters

Paramater Default Maximum Length Accepted Values Description
token API Persistence Token that identifies this user and its permissions.


Optional Paramaters

Paramater Default Maximum Length Accepted Values Description
search string The search terms to be used in the query.
limit 100 The maximum number of channels to return.
fields id, name, type, url, logo_url API Channel Fields List of comma separated fields to be returned in the response.
page 1 Depends on query Integer The current pages to display based on the limit.
url_time_limit 60 The length of time (in seconds) that the asset url will be accessible for. This only applies to the response.

Response

Field Type Description
http_status integer API Status Code
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
error Rails default
accounts array of API Channel Fields List of channels
result_length integer Total number of results that could be returned. This may not be the number of channels in the response, as it is truncated by limit parameter.

Examples

All channels on the account accessible by the user

Parameters Values
token 1f0qpLwoV5oIcfnU2yvO

All channels on the account accessible by the user, returning all fields

Parameters Values
token 1f0qpLwoV5oIcfnU2yvO
fields id,name,url,logo_url,type,updated_at,created_at

Return 2 results using search term "test"

result_length is 3 because there are 3 channels that can be returned, but the user requested only for 2

Parameters Values
token 1f0qpLwoV5oIcfnU2yvO
limit 2
search test

Search for type "Website"

Parameters Values
token 1f0qpLwoV5oIcfnU2yvO
search Website