-
Notifications
You must be signed in to change notification settings - Fork 0
Schedule
Matthew Martin edited this page Jun 10, 2020
·
4 revisions
Returns the details of a particular schedule
URI Parameters: scheduleId: 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 schedule exists
Body: application/json
{
"created": string - iso date and time the resource was created,
"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": "schedule",
"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,
"cron": string - when to play the audio resource in Cron format
},...
],
"playlists":
[
{
"uid": string - the unique identifier for the playlist to play,
"times_to_play": integer - the number of times to play the playlist. -1 = keep playing,
"cron": string - when to play the playlist in Cron format,
"shuffle": boolean true to shuffle the playlist
},...
]
}
Returned when the schedule does not exist
Body: application/json
{
"code": 404,
"error": "Not Found"
}
todo
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 scheduleId: 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,
]
}