-
Notifications
You must be signed in to change notification settings - Fork 0
Playlist
Returns the details of a particular playlist
URI Parameters: playlistId: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)
Returned when the playlist exists
Body: application/json
{
"created": string - iso date and time the resource was created,
"modified": string - iso date and time the resource was last modified,
"description": string - user entered description,
"label": string - a human readable title,
"locked": boolean - true if the file is locked because it is playing or queued to play,
"type": "playlist",
"uid": string - the unique id of the resource,
"files":
[
{
"uid": string - the unique identifier for the audio resource to play,
"times_to_play": integer - the number of times to play the audio resource. -1 = keep playing,
},...
]
}
Returned when the playlist does not exist
Body: application/json
{
"code": 404,
"error": "Not Found"
}
Updates the playlist with the given {playlistId}
Body: application/json
{
"label": string - a human readable title of the playlist
"description": string - a description of the playlist
"files":
[
{
"uid": string - the unique identifier for the audio resource to play,
"times_to_play": integer - the number of times to play the audio resource. -1 = keep playing,
},...
]
}
The playlist has been updated successfully
Body: application/json
{
"result": boolean - true if this particular playlist was uploaded,
}
The data sent to the endpoint was incorrect in some way
Body: application/json
{
"result": boolean - false,
"reason":
[
an array of strings giving the reasons for the failure
],
"data":
{
the json that was sent to the server
}
}
The playlist does not exist
Body: application/json
{
"result": boolean - false,
"reason":
[
an array of strings giving the reasons for the failure
],
"data":
{
the json that was sent to the server
}
}
A different playlist already exists on the server with the given label.
Body: application/json
{
"result": boolean - false,
"reason":
[
an array of strings giving the reasons for the failure
],
"data":
{
the json that was sent to the server
}
}
Returned when the system has been locked using the Status API endpoint
Body: application/json
{
"result": false,
"reason":
[
"the system is locked"
]
}
Deletes the resource
URI Parameters playlistId: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)
Returned if the resource is deleted
Body: application/json
{
"result": true
}
Returned when the resource cannot be found
Body: application/json
{
"result": false,
"reason":
[
string - reason for failure
]
}
Returned when
- the system has been locked using the Status API endpoint
- the resource has been locked as it is playing
- the resource has been locked as it is part of a playlist or schedule
Body: application/json
{
"result": false,
"reason":
[
string - reason for failure,
]
}