ingest

Claim an ingest job

Changed on

Atomically hands the caller the highest-priority claimable job and moves it to probing. Claimable means waiting, or claimed by a worker that has not reported for longer than the ingest lease. Concurrent callers are never given the same job. An idle queue answers 204.

post/api/ingest/claim

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Authorization
    • API key in cookie sessionid

Request body

workerstring

Response

videointeger required
state'pending' | 'probing' | 'archiving' | 'transcoding' | 'done' | 'failed' required
  • pending - Waiting to be picked up
  • probing - Inspecting the uploaded file
  • archiving - Storing the original
  • transcoding - Generating derived files
  • done - Finished
  • failed - Failed
priorityinteger

Claim order among waiting jobs; higher is claimed sooner.

kind'upload' | 'backfill'
  • upload - Source is a fresh upload in the tusd volume
  • backfill - Source is the media archive
claimedBystring nullable required

Identity of the worker that last claimed this job, if any.

percentageDoneinteger nullable

Progress through the current state, not through the pipeline as a whole. Null where the current state has no progress to report.

errorCodestring

Machine-readable reason the ingest failed; empty otherwise. The wording shown to the uploader is the frontend's to choose, not ingest's.

updatedTimestring date-time nullable required

Changes