General Notes
- All paths are relative to the REST endpoint base (something like http://your.server/files)
- If you notice that this service is not working as expected, there might be a bug! You should file an error report with your server logs from the time when the error occurred: Opencast Issue Tracker
Table of Contents
- GET /assets/{mediaPackageID}/{mediaPackageElementID}/{version}/{filename}
- GET /episode/{mediaPackageID}
- GET /{mediaPackageID}/properties.json
- GET /{mediaPackageID}/workflowProperties.json
- POST /add
- DELETE /delete/{id}
- POST /moveByDate
- POST /moveById
- POST /moveByIdAndDate
- POST /moveByIdAndVersion
- POST /{mediaPackageID}/workflowProperties
- POST /snapshot
- POST /updateIndex
Read methods
Method / Path: | GET /assets/{mediaPackageID}/{mediaPackageElementID}/{version}/{filename} |
---|---|
Description: | Get an asset |
Path params: |
mediaPackageID:
the media package identifier mediaPackageElementID: the media package element identifier version: the media package version filename: a descriptive filename used as the download filename |
Optional (query) params: | NONE |
Status codes: |
200: OK, File returned 404: Not Found, Not found 304: Not Modified, If file not modified 403: Forbidden, Not allowed to read assets of this snapshot. 500: Internal Server Error, There has been an internal error. |
Notes: |
|
Testing: |
Sample:
/assets/{mediaPackageID}/{mediaPackageElementID}/{version}/{filename}
Testing form (click to reveal)
|
Method / Path: | GET /episode/{mediaPackageID} |
---|---|
Description: | Get the media package from the last snapshot of an episode. |
Path params: | mediaPackageID: the media package ID |
Optional (query) params: | NONE |
Response formats: | text/xml |
Status codes: |
200: OK, Media package returned 404: Not Found, Not found 403: Forbidden, Not allowed to read media package. 500: Internal Server Error, There has been an internal error. |
Notes: |
|
Testing: |
Sample:
/episode/{mediaPackageID}
Testing form (click to reveal)
|
Method / Path: | GET /{mediaPackageID}/properties.json |
---|---|
Description: | Get stored properties for an episode. |
Path params: | mediaPackageID: the media package ID |
Optional (query) params: | namespace: property namespace |
Response formats: | application/json |
Status codes: |
200: OK, Media package returned 404: Not Found, Not found 403: Forbidden, Not allowed to read media package. 500: Internal Server Error, There has been an internal error. |
Notes: |
|
Testing: |
Sample:
/{mediaPackageID}/properties.json?namespace={namespace}
Testing form (click to reveal)
|
Method / Path: | GET /{mediaPackageID}/workflowProperties.json |
---|---|
Description: | Get stored workflow properties for an episode. |
Path params: | mediaPackageID: the media package ID |
Optional (query) params: | NONE |
Response formats: | application/json |
Status codes: |
200: OK, Media package returned 200: OK, Invalid parameters 404: Not Found, Not found 403: Forbidden, Not allowed to read media package. 500: Internal Server Error, There has been an internal error. |
Notes: |
|
Testing: |
Sample:
/{mediaPackageID}/workflowProperties.json
Testing form (click to reveal)
|
Write methods
Method / Path: | POST /add |
---|---|
Description: | Adds a media package to the asset manager. This method is deprecated in favor of method POST 'snapshot'. |
Path params: | NONE |
Required (form) params: | mediapackage: The media package to add to the search index. |
Optional (form) params: | NONE |
Status codes: |
204: No Content, The media package was added, no content to return. 403: Forbidden, Not allowed to add a media package. 500: Internal Server Error, There has been an internal error and the media package could not be added |
Notes: |
|
Testing: |
Sample:
/add
Testing form (click to reveal)
|
Method / Path: | DELETE /delete/{id} |
---|---|
Description: | Removes snapshots of an episode, owned by the default owner from the asset manager. |
Path params: | id: The media package ID of the episode whose snapshots shall be removed from the asset manager. |
Optional (query) params: | NONE |
Status codes: |
204: No Content, Snapshots have been removed, no content to return. 404: Not Found, The episode does either not exist or no snapshots are owned by the default owner. 403: Forbidden, Not allowed to delete this episode. 500: Internal Server Error, There has been an internal error and the episode could not be deleted. |
Notes: |
|
Testing: |
Sample:
/delete/{id}
Testing form (click to reveal)
|
Method / Path: | POST /moveByDate |
---|---|
Description: | Move all snapshots between two dates. |
Path params: | NONE |
Required (form) params: |
start: The start date, in the format yyyy-MM-dd'T'HH:mm:ss'Z'.
end: The end date, in the format yyyy-MM-dd'T'HH:mm:ss'Z'. target: The target storage to move the mediapackage to. |
Optional (form) params: | NONE |
Response formats: | text/xml |
Status codes: |
200: OK, The job created to move the snapshots. 400: Bad Request, Invalid parameters, and the job was not created 500: Internal Server Error, There has been an internal error, and the job was not created |
Notes: |
|
Testing: |
Sample:
/moveByDate
Testing form (click to reveal)
|
Method / Path: | POST /moveById |
---|---|
Description: | Move a mediapackage based on its ID. |
Path params: | NONE |
Required (form) params: |
id: The mediapackage ID to move.
target: The target storage to move the mediapackage to. |
Optional (form) params: | NONE |
Response formats: | text/xml |
Status codes: |
200: OK, The job created to move the snapshot. 400: Bad Request, Invalid parameters, and the job was not created 500: Internal Server Error, There has been an internal error, and the job was not created |
Notes: |
|
Testing: |
Sample:
/moveById
Testing form (click to reveal)
|
Method / Path: | POST /moveByIdAndDate |
---|---|
Description: | Move all snapshots for a given mediapackage taken between two dates. |
Path params: | NONE |
Required (form) params: |
id: The mediapackage ID to move.
start: The start date, in the format yyyy-MM-dd'T'HH:mm:ss'Z'. end: The end date, in the format yyyy-MM-dd'T'HH:mm:ss'Z'. target: The target storage to move the mediapackage to. |
Optional (form) params: | NONE |
Response formats: | text/xml |
Status codes: |
200: OK, The job created to move the snapshots. 400: Bad Request, Invalid parameters, and the job was not created 500: Internal Server Error, There has been an internal error, and the job was not created |
Notes: |
|
Testing: |
Sample:
/moveByIdAndDate
Testing form (click to reveal)
|
Method / Path: | POST /moveByIdAndVersion |
---|---|
Description: | Move a mediapackage based on its ID and version. |
Path params: | NONE |
Required (form) params: |
id: The mediapackage ID to move.
version: The version to move. target: The target storage to move the mediapackage to. |
Optional (form) params: | NONE |
Response formats: | text/xml |
Status codes: |
200: OK, The job created to move the snapshot. 400: Bad Request, Invalid parameters, and the job was not created 500: Internal Server Error, There has been an internal error, and the job was not created |
Notes: |
|
Testing: |
Sample:
/moveByIdAndVersion
Testing form (click to reveal)
|
Method / Path: | POST /{mediaPackageID}/workflowProperties |
---|---|
Description: | Set additional workflow properties |
Path params: | mediaPackageID: the media package ID |
Required (form) params: | properties: JSON object containing new properties |
Optional (form) params: | NONE |
Status codes: |
201: Created, Properties successfully set 400: Bad Request, Invalid data 500: Internal Server Error, Internal error |
Notes: |
|
Testing: |
Sample:
/{mediaPackageID}/workflowProperties
Testing form (click to reveal)
|
Method / Path: | POST /snapshot |
---|---|
Description: | Take a versioned snapshot of a media package. |
Path params: | NONE |
Required (form) params: | mediapackage: The media package to take a snapshot from. |
Optional (form) params: | NONE |
Status codes: |
204: No Content, A snapshot of the media package has been taken, no content to return. 403: Forbidden, Not allowed to take a snapshot. 500: Internal Server Error, There has been an internal error and no snapshot could be taken. |
Notes: |
|
Testing: |
Sample:
/snapshot
Testing form (click to reveal)
|
Method / Path: | POST /updateIndex |
---|---|
Description: | Trigger search index update for event. The usage of this is limited to global administrators. |
Path params: | NONE |
Required (form) params: | id: The event ID to trigger an index update for. |
Optional (form) params: | NONE |
Status codes: |
204: No Content, Update successfully triggered. 403: Forbidden, Not allowed to trigger update. 404: Not Found, No such event found. |
Notes: |
|
Testing: |
Sample:
/updateIndex
Testing form (click to reveal)
|