# Reorder Channels
API call format
PUT /broker/channels/{reorder} //Use token autorization
PUT /broker/private/channels/{reorder} //Use Api Key
{
"channels": [
"<channel_guid_1>",
"<channel_guid_2>",
"<channel_guid_3>",
]
}
Description
This call resets existing order for the given channels starting from 1 and then 2.3 ...
Precondition
- Authorization token/Api key is needed.
- Mandatory elements (should be specified):
- channels[] - array of channels guids to re-order. Take channel guids using Channels List API call.
Postcondition
- On success response code should be 200
- On success the the channels order is reset to start from the beggining - 1,2,3....
- On failure an error will be returned with the right error code and description.
Example:
[Request] PUT https://<base_api_url>/broker/channels/reorder
[Request] PUT https://<base_api_url>/broker/private/channels/reorder
{
"channels": [
"<channel_guid_1>", //use GET /broker/channels to find a specific guid
"<channel_guid_2>",
"<channel_guid_3>",
]
}
[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": "Channels were reordered successfully"
}