Opencast

Big File Upload Service REST Documentation

/upload
This service provides a facility to upload files that exceed the 2 GB boundry imposed by most browsers through chunked uploads via HTTP.

General Notes

Table of Contents

Read methods

Method / Path: GET /job/{jobID}.{format:xml|json}
Description: Returns the XML or the JSON representation of an upload job.
Path params: jobID: The ID of the upload job
format: The output format (json or xml) of the response body.
Optional (query) params: NONE
Response formats: application/xml
application/json
Status codes: 200: OK, the job was successfully retrieved.
404: Not Found, the job was not found.
Notes:
  • Return value description: The XML representation of the requested upload job.
Testing:
Sample: /job/{jobID}.{format:xml|json}
Testing form (click to reveal)
Method / Path: GET /job/{jobID}/{filename}
Description: Returns the payload of the upload job.
Path params: jobID: The ID of the upload job to retrieve the file from
filename: The name of the payload file
Optional (query) params: NONE
Response formats: application/octet-stream
Status codes: 200: OK, the job and file have been found.
404: Not Found, the job or file were not found.
Notes:
  • Return value description: The payload of the upload job
Testing:
Sample: /job/{jobID}/{filename}
Testing form (click to reveal)

Write methods

Method / Path: DELETE /job/{jobID}
Description: Deletes an upload job on the server.
Path params: jobID: The ID of the upload job to be deleted
Optional (query) params: NONE
Response formats: text/plain
Status codes: 200: OK, the job was successfully deleted.
404: Not Found, the job was not found.
Notes:
  • Return value description: A success message that starts with OK
Testing:
Sample: /job/{jobID}
Testing form (click to reveal)
Method / Path: POST /job/{jobID}
Description: Appends the next chunk of data to the file on the server.
Path params: jobID: The ID of the upload job
Optional (form) params: chunknumber: The number of the current chunk
filedata: The payload
Response formats: application/xml
Status codes: 200: OK, the chunk data was successfully appended to file on server
404: Not Found, the upload job was not found
400: Bad Request, the request was malformed
Notes:
  • Return value description: The XML representation of the updated upload job
Testing:
Sample: /job/{jobID}
Testing form (click to reveal)
Method / Path: POST /newjob
Description: Creates a new upload job and returns the jobs ID.
Path params: NONE
Optional (form) params: filename: The name of the file that will be uploaded
filesize: The size of the file that will be uploaded
chunksize: The size of the chunks that will be uploaded
flavor: The flavor of this track
mediapackage: The mediapackage the file should belong to
Response formats: text/plain
Status codes: 200: OK, job was successfully created
204: No Content, upload service gave an error
Notes:
  • Return value description: The ID of the newly created upload job
Testing:
Sample: /newjob
Testing form (click to reveal)