Sidecars

14 个接口 · 概览

GET/v1/spaces/{sid}/namespaces

Sidecar namespaces that one member alone writes in this space
Bearer 令牌

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$

响应

  • 200
    Owned namespaces
    object
    › 展开字段
    • itemsNamespaceOwner[]必填
      › 3 个字段
      • namespacestring必填
      • ownerUser必填
        › 4 个字段
        • idstring必填
        • emailstring必填
          Agents have an address at agents.invalid: it finds them for invites, no mail goes there
        • display_namestring必填
        • kindstring必填
          humanagent
      • created_atTimestamp必填
  • 4xx/5xx
    Error
    Error
请求示例
curl "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/namespaces" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "items": [
    {
      "namespace": "x-acme.qc",
      "owner": {},
      "created_at": "2026-11-14T09:30:00Z"
    }
  ]
}

PUT/v1/spaces/{sid}/namespaces/{ns}

Let only this member write the namespace here (manager). ai.generation or a custom x-… namespace.
Bearer 令牌

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • nsstring必填

请求体 application/json

  • owner_idstring必填

响应

请求示例
curl -X PUT "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/namespaces/x-acme.qc" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"owner_id":"nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"}'
响应示例 · 200
{
  "namespace": "x-acme.qc",
  "owner": {
    "id": "id",
    "email": "mei@studio.example",
    "display_name": "display_name",
    "kind": "human"
  },
  "created_at": "2026-11-14T09:30:00Z"
}

DELETE/v1/spaces/{sid}/namespaces/{ns}

Let every editor write the namespace again (manager)
Bearer 令牌

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • nsstring必填

响应

  • 204
    Released
  • 4xx/5xx
    Error
    Error
请求示例
curl -X DELETE "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/namespaces/x-acme.qc" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"

GET/v1/spaces/{sid}/versions/{vid}/sidecars

Bearer 令牌

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$

响应

  • 200
    Sidecars
    object
    › 展开字段
    • itemsSidecar[]
      › 8 个字段
      • namespacestring必填
      • docobject必填
      • schema_versioninteger必填
      • producerobject | null必填
        Who wrote it, e.g. {"name":"cliptap","version":"1.2","inherited_from":"ver_..."}; a person's edit of a transcript adds edited_by and edited_at
        必填
      • updated_atTimestamp必填
      • revinteger必填
        Raised by every write; send it back to refuse overwriting someone (ADR 0060)
      • revision_idstring
        The current revision (namespaces that keep them: transcript)
      • newer_revision_idstring
        A run's result newer than a person's current revision, waiting to be picked (PUT …/current)
  • 4xx/5xx
    Error
    Error
请求示例
curl "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/sidecars" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "items": [
    {
      "namespace": "x-acme.qc",
      "doc": {},
      "schema_version": 1,
      "producer": {},
      "updated_at": "2026-11-14T09:30:00Z",
      "rev": 1,
      "revision_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
      "newer_revision_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"
    }
  ]
}

GET/v1/spaces/{sid}/versions/{vid}/sidecars/{ns}

Bearer 令牌

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$
  • nsstring必填

响应

请求示例
curl "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/sidecars/x-acme.qc" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "namespace": "x-acme.qc",
  "doc": {},
  "schema_version": 1,
  "producer": {},
  "updated_at": "2026-11-14T09:30:00Z",
  "rev": 1,
  "revision_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "newer_revision_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"
}

PUT/v1/spaces/{sid}/versions/{vid}/sidecars/{ns}

Write a whole sidecar (editor)
Bearer 令牌

Built-in namespaces are validated against proto/sidecar/.json. A namespace the server has no schema for (a plugin's x-…, or an ai.… one newer than the server) is taken when it uses the standard shapes (library-and-search.md 3.2: text fields are strings, segments/chapters/highlights are lists of items with at or start seconds, everything else a flat value), and indexed like a built-in one; otherwise 400 says which rule failed (ADR 0060). core and media are server-written.

With rev (or If-Match: "<rev>"), the write is refused with 409 stale_rev (details.rev is the current one) when the sidecar changed since that rev was read; 0 means "there was none". Without it, the last write wins. In fields, a run's write keeps the values people set. In a namespace that keeps revisions (transcript), every write adds one; a run's never replaces a person's current revision.

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$
  • nsstring必填

参数 · 请求头

  • If-Matchstring
    The rev read, e.g. "3" (instead of rev in the body)

请求体PutSidecarRequest application/json

  • docobject必填
  • schema_versioninteger
    default 1
  • producerobject
  • revinteger
    The rev read (0: none yet); a stale one is refused with 409 stale_rev

响应

  • 200
    Sidecar
    Sidecar
  • 409
    stale_rev: someone wrote since (details.rev)
    Error
  • 4xx/5xx
    Error
    Error
请求示例
curl -X PUT "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/sidecars/x-acme.qc" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"doc":{}}'
响应示例 · 200
{
  "namespace": "x-acme.qc",
  "doc": {},
  "schema_version": 1,
  "producer": {},
  "updated_at": "2026-11-14T09:30:00Z",
  "rev": 1,
  "revision_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "newer_revision_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"
}

PATCH/v1/spaces/{sid}/versions/{vid}/sidecars/{ns}

Change fields of a sidecar (editor)
Bearer 令牌

Applies ops to the current document under a lock on it, then checks the result like a PUT. set and unset change a field (path: keys joined by dots, e.g. rating, client.value); add and remove add a value to a set (a list of strings, numbers or booleans: tags, hidden_tags) or take it out. Two people adding tags at once both land. A sidecar that does not exist starts empty. rev / If-Match work as for PUT. In fields, a person's values are stamped by: user with at and user_id, and a run's do not replace them.

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$
  • nsstring必填

参数 · 请求头

  • If-Matchstring

请求体PatchSidecarRequest application/json

  • opsobject[]必填
    ≤ 200 items
    › 3 个字段
    • opstring必填
      setunsetaddremove
    • pathstring必填
      Keys joined by dots (one to four): tags, rating, client.value
    • valueany
      For set: any JSON; for add and remove: a string, number or boolean
  • revinteger
  • schema_versioninteger
  • producerobject

响应

  • 200
    Sidecar
    Sidecar
  • 409
    stale_rev: someone wrote since (details.rev)
    Error
  • 4xx/5xx
    Error
    Error
请求示例
curl -X PATCH "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/sidecars/x-acme.qc" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ops":[{"op":"set","path":"Ep01/Shots/A001_C003.mov"}]}'
响应示例 · 200
{
  "namespace": "x-acme.qc",
  "doc": {},
  "schema_version": 1,
  "producer": {},
  "updated_at": "2026-11-14T09:30:00Z",
  "rev": 1,
  "revision_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "newer_revision_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"
}

DELETE/v1/spaces/{sid}/versions/{vid}/sidecars/{ns}

Remove a sidecar, with its revisions (editor)
Bearer 令牌

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$
  • nsstring必填

响应

  • 204
    Deleted
  • 4xx/5xx
    Error
    Error
请求示例
curl -X DELETE "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/sidecars/x-acme.qc" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"

GET/v1/spaces/{sid}/versions/{vid}/sidecars/{ns}/revisions

The revisions of a sidecar people correct (transcript), newest first (ADR 0060)
Bearer 令牌

Each is by ai (a run's result) or user (a person's or an agent's edit, based_on the one it changed); one is current, and the sidecar's doc is it. A sidecar written before revisions shows one, with an empty id, until it is next written.

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$
  • nsstring必填

响应

  • 200
    Revisions
    object
    › 展开字段
    • itemsSidecarRevision[]
      › 10 个字段
      • idstring必填
      • ninteger必填
        1, 2, … per version and namespace
      • bystring必填
        aiuser
      • based_onstring | null必填
        The revision a person's edit changed
        必填
      • currentboolean必填
      • created_byUser | any必填
        Who wrote it; for a run, who started it
      • created_atTimestamp必填
      • schema_versioninteger必填
      • producerobject | null必填
        必填
      • docobject
        Only when one revision is read
  • 400
    The namespace keeps no revisions
    Error
  • 4xx/5xx
    Error
    Error
请求示例
curl "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/sidecars/x-acme.qc/revisions" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "items": [
    {
      "id": "id",
      "n": 1,
      "by": "ai",
      "based_on": "based_on",
      "current": false,
      "created_by": {},
      "created_at": "2026-11-14T09:30:00Z",
      "schema_version": 1,
      "producer": {},
      "doc": {}
    }
  ]
}

GET/v1/spaces/{sid}/versions/{vid}/sidecars/{ns}/revisions/{rid}

One revision, with its document
Bearer 令牌

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$
  • nsstring必填
  • ridstring必填

响应

请求示例
curl "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/sidecars/x-acme.qc/revisions/rid" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "id": "id",
  "n": 1,
  "by": "ai",
  "based_on": "based_on",
  "current": false,
  "created_by": {
    "id": "id",
    "email": "mei@studio.example",
    "display_name": "display_name",
    "kind": "human"
  },
  "created_at": "2026-11-14T09:30:00Z",
  "schema_version": 1,
  "producer": {},
  "doc": {}
}

PUT/v1/spaces/{sid}/versions/{vid}/sidecars/{ns}/current

Make a revision the current one (editor), e.g. take the new AI transcript over a person's; the index follows
Bearer 令牌

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$
  • nsstring必填

参数 · 请求头

  • If-Matchstring

请求体 application/json

  • revision_idstring必填
  • revinteger
    The sidecar rev read; 409 stale_rev when it changed

响应

请求示例
curl -X PUT "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/sidecars/x-acme.qc/current" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"revision_id":"nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"}'
响应示例 · 200
{
  "namespace": "x-acme.qc",
  "doc": {},
  "schema_version": 1,
  "producer": {},
  "updated_at": "2026-11-14T09:30:00Z",
  "rev": 1,
  "revision_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "newer_revision_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"
}

GET/v1/spaces/{sid}/versions/{vid}/media

Where the server is with a version's previews (proxy, poster, filmstrip, waveform), with time left
Bearer 令牌

Poll this while a video is being transcoded to show "preview being made" instead of failing to play an original the viewer cannot decode. Renditions lists what can be fetched now (proxy_start plays the opening seconds before the whole proxy is ready).

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$

响应

请求示例
curl "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/media" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "state": "none",
  "stage": "start",
  "progress": 0.5,
  "eta_s": 1,
  "ahead": 1,
  "renditions": [
    "rendition"
  ],
  "media": {}
}

GET/v1/spaces/{sid}/versions/{vid}/renditions/{kind}

Bearer 令牌

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$
  • kindstring必填

响应

请求示例
curl "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/renditions/kind" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "kind": "kind",
  "mime": "video/quicktime",
  "manifest_hash": "manifest_hash",
  "size": 734003200
}

PUT/v1/spaces/{sid}/versions/{vid}/renditions/{kind}

Attach a derived file (chunks uploaded through an upload session first)
Bearer 令牌

参数 · 路径

  • sidstring必填
    ^spc_[0-9A-HJKMNP-TV-Z]{26}$
  • vidstring必填
    ^ver_[0-9A-HJKMNP-TV-Z]{26}$
  • kindstring必填

请求体PutRenditionRequest application/json

  • manifestManifest必填
    › 3 个字段
    • algostring必填
      fastcdc-v1 (content-defined, 512 KiB to 8 MiB) or fixed-4m-v1 (4 MiB pieces, the last shorter; what browsers send, ADR 0042)
      fastcdc-v1fixed-4m-v1
    • sizeinteger必填
    • chunksChunkRef[]必填
      › 3 个字段
      • hashHash必填
        ^[0-9a-f]{64}$
      • offsetinteger必填
      • leninteger必填
  • mimestring必填

响应

请求示例
curl -X PUT "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/versions/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T/renditions/kind" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"manifest":{"algo":"fastcdc-v1","size":734003200,"chunks":[]},"mime":"video/quicktime"}'
响应示例 · 200
{
  "kind": "kind",
  "mime": "video/quicktime",
  "manifest_hash": "manifest_hash",
  "size": 734003200
}