---
title: "Report a video's ingest state"
method: PUT
path: "/api/videos/{id}/ingest"
tags: ["videos"]
---

# Report a video's ingest state

`PUT /api/videos/{id}/ingest`

## Request

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

Replaces the video's ingest state with the one given. Reserved for the ingest service; the whole state is sent every time, so a retried report is indistinguishable from the first.

## Path parameters

- `id` integer, required

## Request body

- IngestJobRequest: What ingest reports about an upload, and what its uploader is shown. `status_text` is write-only deliberately: it carries ffmpeg's complaints and the archive paths behind them, which belong in the admin and the logs rather than in a response to an organization's members. What they get instead is `error_code`, which the frontend turns into words -- ingest has no business choosing the Norwegian.
  - `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
  - `priority` integer: Claim order among waiting jobs; higher is claimed sooner.
  - `kind` 'upload' | 'backfill': Where this job's source file is, and therefore which workers can take it. * `upload` - Source is a fresh upload in the tusd volume * `backfill` - Source is the media archive
  - `percentageDone` integer, nullable: Progress through the current state, not through the pipeline as a whole. Null where the current state has no progress to report.
  - `statusText` string
  - `errorCode` string: Machine-readable reason the ingest failed; empty otherwise. The wording shown to the uploader is the frontend's to choose, not ingest's.

## Response `200`

- IngestJob: What ingest reports about an upload, and what its uploader is shown. `status_text` is write-only deliberately: it carries ffmpeg's complaints and the archive paths behind them, which belong in the admin and the logs rather than in a response to an organization's members. What they get instead is `error_code`, which the frontend turns into words -- ingest has no business choosing the Norwegian.
  - `video` integer, 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
  - `priority` integer: Claim order among waiting jobs; higher is claimed sooner.
  - `kind` 'upload' | 'backfill': Where this job's source file is, and therefore which workers can take it. * `upload` - Source is a fresh upload in the tusd volume * `backfill` - Source is the media archive
  - `claimedBy` string, nullable, required: Identity of the worker that last claimed this job, if any.
  - `percentageDone` integer, nullable: Progress through the current state, not through the pipeline as a whole. Null where the current state has no progress to report.
  - `errorCode` string: Machine-readable reason the ingest failed; empty otherwise. The wording shown to the uploader is the frontend's to choose, not ingest's.
  - `updatedTime` string, date-time, nullable, required

## Other responses

- `400`
- `401`
- `403`
- `404`
- `405`
- `406`
- `415`
- `500`

## Changes

- **2026-08-27** `3761c2b166bb`: 2 breaking, 7 info
  - for the `path` request parameter `id`, the type changed from `string` to `integer`
  - added `#/components/schemas/VideosIngestReportPriorityErrorComponent, #/components/schemas/VideosIngestReportKindErrorComponent` to the `oneOf[#/components/schemas/VideosIngestReportValidationError]/errors/items/` response property `oneOf` list for the response status `400`
  - added the new optional request property `kind`
  - added the new optional request property `priority`
  - …5 more
- **2026-08-18** `baf6b00d7559`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/changes/api/videos/:id/ingest/put.md)

---

[API](https://skmtc.dev/frikanalen/apis/frikanalen-django-api.md) - [All operations](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/llms.txt) - [OpenAPI document](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/revisions/ebd4175e41fe?raw)
