Opencast

Static Resources Service REST Documentation

/staticfiles
This service allows the uploading of static resources such as videos and images.

General Notes

Table of Contents

Read methods

Method / Path: GET /{uuid}
Description: Returns a static file resource
Path params: uuid: Static File Universal Unique Id
Optional (query) params: NONE
Status codes: 200: OK, Returns a static file resource
404: Not Found, No file by the given uuid found
Testing:
Sample: /{uuid}
Testing form (click to reveal)
Method / Path: GET /{uuid}/url
Description: Returns a static file resource's URL
Path params: uuid: Static File Universal Unique Id
Optional (query) params: NONE
Response formats: text/plain
Status codes: 200: OK, Returns a static file resource's URL
404: Not Found, No file by the given uuid found
Testing:
Sample: /{uuid}/url
Testing form (click to reveal)

Write methods

Method / Path: DELETE /{uuid}
Description: Remove the static file
Path params: uuid: Static File Universal Unique Id
Optional (query) params: NONE
Status codes: 204: No Content, File deleted
404: Not Found, No file by the given uuid found
Notes:
  • Return value description: No content
Testing:
Sample: /{uuid}
Testing form (click to reveal)
Method / Path: POST /{uuid}/persist
Description: Persists a recently uploaded file to the permanent storage
Path params: uuid: File UUID
Optional (form) params: NONE
Status codes: 200: OK, The file has been persisted
404: Not Found, No file by the given UUID found
Testing:
Sample: /{uuid}/persist
Testing form (click to reveal)
Method / Path: POST /
Description: Post a new static resource
Path params: NONE
Body (upload) param: The static resource file
Optional (form) params: NONE
Response formats: text/plain
Status codes: 201: Created, Returns the id of the uploaded static resource
400: Bad Request, No filename or file to upload found
400: Bad Request, The upload size is too big
Testing:
Sample: /
Testing form (click to reveal)