Upload a piece of a recording
const url = 'https://collab.work.optidata.cloud/api/rooms/a3050cd3-5921-4153-b90a-owt42-e94de63c7b15/recordings/1739/recovery/chunks';const form = new FormData();form.append('file', 'file');form.append('chunk_index', '1');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://collab.work.optidata.cloud/api/rooms/a3050cd3-5921-4153-b90a-owt42-e94de63c7b15/recordings/1739/recovery/chunks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@file \ --form chunk_index=1Uploads one piece of a recording being recovered, in order: the first
piece is chunk_index 0. Send every piece, then call
finishRecordingRecovery with the number of pieces sent.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”The room’s hash (from its link) or its permanent-link identifier custom_hash.
The recording’s id. The recording must belong to the room in the path.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The piece of the recording.
Position of the piece, starting at 0.
Responses
Section titled “ Responses ”Piece stored.
object
Examples
{ "chunk_index": 0}No authentication key was sent, or it is malformed.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}Only the person who made the recording may recover it — or recordings are not enabled for your company.
A refused or not-found request.
object
An error raised by the application’s own rules.
object
What went wrong.
The HTTP status, repeated.
What to do about it, when there is a hint.
Examples
{ "message": "You do not have permission to update this recording."}No room has this hash or permanent link.
A refused or not-found request.
object
Examples
{ "message": ""}The authentication key is expired or not recognised. Get a fresh one and retry.
Authentication failures use an error key rather than message.
object
Examples
{ "error": "JWT passport expired: Passport expired"}The body failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The file field is required. (and 1 more error)", "errors": { "file": [ "The file field is required." ], "chunk_index": [ "The chunk index field is required." ] }}