-
Notifications
You must be signed in to change notification settings - Fork 0
0.7 Player Administration
The following methods are used to administrate various aspects of a UDJ player. In any of the following methods, if the player_id specified does not exist, an HTTP 404 response is returned with the X-Udj-Missing-Resource header set to player.
- /players/
player_id/password - /players/
player_id/location - /players/
player_id/sorting_algorithm - /players/
player_id/state - /players/
player_id/volume - /players/
player_id/enabled_libraries - /players/
player_id/kick_user/user_id - /players/
player_id/banned_users - /players/
player_id/banned_music
Changes the password of the player specified by player_id to the string specified by the
password JSON parameter.
The password is changed.
- Http 400 - Bad Request - The password does not meet the strength requirements of the server
- Http 403 - Forbidden - Header "X-Udj-Forbidden-Reason" set to
player-permission- Client doesn't have proper missions to modify the player's password. - HTTP 404 - Not Found - Header "X-Udj-Missing-Resource" set to
player- The player specified byplayer_iddoes not exist. - HTTP 415 - Unsupported Media Type - The request must have content-type
text-/json.
Removes the password from the player.
The password is removed.
- Http 403 - Forbidden - Header "X-Udj-Forbidden-Reason" set to
player-permission- Client doesn't have proper missions to modify the player's password. - HTTP 404 - Not Found - Header "X-Udj-Missing-Resource" set to
player- The player specified byplayer_iddoes not exist.
Changes the location of the player specified by player_id the specified, JSON-defined location.
Example JSON:
"location" :
{
"address" : "1601 Willow Road",
"locality" : "Menlo Park",
"region" : "California",
"postal_code" : "94025",
"country" : "United States"
},
The location is changed.
- HTTP 400 - Bad Request - Response body "Bad location" - The given location can not be found by the server.
- Http 403 - Forbidden - Header "X-Udj-Forbidden-Reason" set to
player-permission- Client doesn't have proper missions to modify the player's location. - HTTP 404 - Not Found - Header "X-Udj-Missing-Resource" set to
player- The player specified byplayer_iddoes not exist. - HTTP 415 - Unsupported Media Type - The request must have content-type
text-/json.
Removes the location from the player.
The location is removed.
- Http 403 - Forbidden - Header "X-Udj-Forbidden-Reason" set to
player-permission- Client doesn't have proper missions to modify the player's password. - HTTP 404 - Not Found - Header "X-Udj-Missing-Resource" set to
player- The player specified byplayer_iddoes not exist.
Changes the sorting algorithm use by the player specified by player_id to the-JSON specified sorting
alrogithm. Example JSON:
{
"sorting_algorithm_id" : "5"
}
The sorting algorithm is changed.
- HTTP 400 - Bad Request - The given location can not be found by the server.
- Http 403 - Forbidden - Header "X-Udj-Forbidden-Reason" set to
player-permission- Client doesn't have proper missions to modify the player's location. - HTTP 404 - Not Found - Header "X-Udj-Missing-Resource" set to
player- The player specified byplayer_iddoes not exist. - HTTP 404 - Not Found - Header "X-Udj-Missing-Resource" set to
sorting-algorithm- There was not sorting algorithm with the specified id. - HTTP 415 - Unsupported Media Type - The request must have content-type
text-/json.
Changes the player state of the player specified by player_id to the JSON-specified sorting. The state must
be one of the valid states specified by the Player JSON Object.
Example JSON:
{
"state" : "pause"
}
The state is changed.
- HTTP 400 - Bad Request - The state given was not valid
- Http 403 - Forbidden - Header "X-Udj-Forbidden-Reason" set to
player-permission- Client doesn't have proper missions to modify the player's state. - HTTP 404 - Not Found - Header "X-Udj-Missing-Resource" set to
player- The player specified byplayer_iddoes not exist. - HTTP 415 - Unsupported Media Type - The request must have content-type
text-/json.
Changes the volume of the player specified by player_id to the JSON-specified sorting.
Example JSON:
{
"volume" : 5
}
The volume is changed.
- HTTP 400 - Bad Request - A bad volume is given
- Http 403 - Forbidden - Header "X-Udj-Forbidden-Reason" set to
player-permission- Client doesn't have proper missions to modify the player's state. - HTTP 404 - Not Found - Header "X-Udj-Missing-Resource" set to
player- The player specified byplayer_iddoes not exist. - HTTP 415 - Unsupported Media Type - The request must have content-type
text-/json.
enabled_libraries is a list of Library objects that are enabled on the player specified by player_id.
Follows List Semantics
- HTTP 403 - Forbidden - The calling user does not have permission to enable libraries on the player. Header
X-Udj-Forbidden-Reasonis set toplayer-permission. - HTTP 403 - Forbidden - The owner of the player does not have read access to the library being enabled. Header
X-Udj-Forbidden-Reasonis set tolibrary-permission.
- HTTP 403 - Forbidden - The calling user does not have permission to disable libraries on the player.
- HTTP 404 - Not Found - There is no enabled library with matching
id. The headerX-Udj-Missing-Resourceheader set tolibrary.
- HTTP 404 - Not Found - The player never had a password to begin with. Header
X-Udj-Missing-Resourceheader is set topassword.
Kick the specified user from the specified player.
- HTTP 404 - Not Found - No such user is currently participating with the player - Header
X-Udj-Missing-Resourceheader is set touser.
A list of User ids that are banned from this player.
Follows List Semantics
A list of Library Entry ids that are banned from this player.
Used to ban and unban songs a given player.
Follows List Semantics