Opencast

External API Playlists Service REST Documentation

/api/playlists
Provides access to playlist structures

Table of Contents

Read methods

Method / Path: GET /{id}
Description: Get a playlist.
Path params: id: The playlist identifier
Optional (query) params: NONE
Response formats: application/json
application/v1.11.0+json
Status codes: 200: OK, Returns the playlist.
404: Not Found, The specified playlist instance does not exist.
403: Forbidden, The user doesn't have the rights to make this request.
400: Bad Request, The request is invalid or inconsistent.
Notes:
  • Return value description: A playlist as JSON
Testing:
Sample: /{id}
Testing form (click to reveal)
Method / Path: GET /
Description: Get playlists. Playlists that you do not have read access to will not show up.
Path params: NONE
Optional (query) params: limit(Default value=100): The maximum number of results to return for a single request.
offset(Default value=0): The index of the first result to return.
sort(Default value=updated:ASC): Sort the results based upon a sorting criteria. A criteria is specified as a pair such as::ASC or :DESC. Adding the suffix ASC or DESC sets the order as ascending ordescending order and is mandatory. Sort Name is case sensitive. Supported Sort Names are 'updated'
Response formats: application/json
application/v1.11.0+json
Status codes: 200: OK, Returns the playlist.
400: Bad Request, The request is invalid or inconsistent.
Notes:
  • Return value description: A JSON object containing an array.
Testing:
Sample: /?limit=100&offset=0&sort=updated:ASC
Testing form (click to reveal)

Write methods

Method / Path: POST /
Description: Creates a playlist.
Path params: NONE
Optional (form) params: playlist(Default value={ "title": "Opencast Playlist", "description": "This is a playlist about Opencast", "creator": "Opencast", "entries": [ { "contentId": "ID-about-opencast", "type": "EVENT" }, { "contentId": "ID-3d-print", "type": "EVENT" } ], "accessControlEntries": [ { "allow": true, "role": "ROLE_USER_BOB", "action": "read" } ] }): Playlist in JSON format
Response formats: application/json
application/v1.11.0+json
Status codes: 201: Created, Playlist created.
403: Forbidden, The user doesn't have the rights to make this request.
400: Bad Request, The request is invalid or inconsistent.
Notes:
  • Return value description: The created playlist.
Testing:
Sample: /
Testing form (click to reveal)
Method / Path: DELETE /{id}
Description: Removes a playlist.
Path params: id: Playlist identifier
Optional (query) params: NONE
Response formats: application/json
application/v1.11.0+json
Status codes: 200: OK, Playlist removed.
404: Not Found, No playlist with that identifier exists.
401: Unauthorized, Not authorized to perform this action
Notes:
  • Return value description: The removed playlist.
Testing:
Sample: /{id}
Testing form (click to reveal)
Method / Path: PUT /{id}
Description: Updates a playlist.
Path params: id: Playlist identifier
Optional (form) params: playlist(Default value={ "title": "Opencast Playlist", "description": "This is a playlist about Opencast", "creator": "Opencast", "entries": [ { "contentId": "ID-about-opencast", "type": "EVENT" }, { "contentId": "ID-3d-print", "type": "EVENT" } ], "accessControlEntries": [ { "allow": true, "role": "ROLE_USER_BOB", "action": "read" } ] }): Playlist in JSON format
Response formats: application/json
application/v1.11.0+json
Status codes: 200: OK, Playlist updated.
403: Forbidden, The user doesn't have the rights to make this request.
400: Bad Request, The request is invalid or inconsistent.
Notes:
  • Return value description: The updated playlist.
Testing:
Sample: /{id}
Testing form (click to reveal)