Replace a session's video annotations
const url = 'http://localhost:8000/api/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/annotations/';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"payload":[{"additionalProperty":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:8000/api/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/annotations/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "payload": [ { "additionalProperty": "example" } ] }'Replaces the whole markup set for a session (#944). Idempotent — the client owns the array and PUTs the full set on each save. Coordinates are normalised (0..1) so markup survives resize and reprocess. Returns the stored set with the editor + timestamp.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Body of PUT /api/sessions/<id>/annotations/ (#944). Replaces the
whole markup set — coordinates are normalised (0..1) client-side.
object
Array of annotation objects (freehand / ruler / angle / text). Each carries a string id and kind; the rest of the shape is owned by the client renderer.
object
Examplegenerated
{ "payload": [ { "additionalProperty": "example" } ]}Body of PUT /api/sessions/<id>/annotations/ (#944). Replaces the
whole markup set — coordinates are normalised (0..1) client-side.
object
Array of annotation objects (freehand / ruler / angle / text). Each carries a string id and kind; the rest of the shape is owned by the client renderer.
object
Examplegenerated
payload=%7B%22additionalProperty%22%3A%22example%22%7DBody of PUT /api/sessions/<id>/annotations/ (#944). Replaces the
whole markup set — coordinates are normalised (0..1) client-side.
object
Array of annotation objects (freehand / ruler / angle / text). Each carries a string id and kind; the rest of the shape is owned by the client renderer.
object
Responses
Section titled “Responses”Response for the annotation endpoints (#944). Fields are declared
explicitly rather than inferred so the generated client type is
accurate: the empty-set response is all-null, so updated_at /
updated_by must be nullable, and payload is a typed array — the
empty GET now flows through this serializer instead of a raw dict, so
the contract and the wire agree (#1227 review).
object
object
Examplegenerated
{}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examples
Absent, or owned by another team (collapsed to 404)
{ "detail": "session_not_found"}