# Schedules List
API call format
GET /broker/schedules //Use token autorization
GET /broker/private/schedules //Use Api Key
Description
This call gets all available schedules.
Precondition
- Authorization token/Api key is needed.
- Mandatory elements (should be specified):
- "start" - valid Unix timestamp <start_timestamp>.Filter results by start timestamp.
- "channel" - valid channel guid <channel_guid>.Filter results by channel Guid.
Postcondition
- On success response code should be 200
- On success the whole JSON body of the available schedules are returned with details.
- On failure an error will be returned with the right error code and description.
Example:
[Request] GET https://<base_api_url>/broker/schedules
[Request] GET https://<base_api_url>/broker/private/schedules
{
"start": "<start_timestamp>",
"channel":"<channel_guid>"
}
[Request Headers] {"Content-Type":"application/json","Accept":"application/json","Authorization":"<IdToken>"} //Use token autorization
[Request Headers] {"Content-Type":"application/json","Accept":"application/json","X-Api-Key":"<api_key>"} //Use Api Key
[Response] 200
[Response Headers] {"Content-Type":["application/json"],"Content-Length":["..."],"Connection":["keep-alive"],"Date":["..... GMT"],"x-amzn-RequestId":["....."],....]}
[Response]
{
"status": true,
"data":
[
{
"guid": "<schedule_guid_01>",
"channel": "<channel_guid>",
"start": 1574873854034,
"totalDuration": 88074,
"meta":
{
"description": "<source_description>",
"type": "source",
"title": "<source_title>",
"imageUrl": "https://<server>/sources/<source_guid>/thumbnails/a195c2d0fb299646a9daa38f8031f74d_abr_tumb.0000015.jpg"
}
},
{
"guid": "<schedule_guid_02>",
"channel": "<channel_guid>",
"start": 1574873854034,
"totalDuration": 88074,
"meta":
{
"description": "<source_description>",
"type": "source",
"title": "<source_title>",
"imageUrl": "https://<server>/sources/<source_guid>/thumbnails/a195c2d0fb299646a9daa38f8031f74d_abr_tumb.0000015.jpg"
}
},
....
]
}