Spaces

10 个接口 · 概览

GET/v1/spaces

Every drive I reach: each space I am a member of and its forks, with my role in the space
Bearer 令牌

响应

  • 200
    Spaces
    object
    › 展开字段
    • itemsSpace[]
      › 13 个字段
      • idstring必填
      • namestring必填
      • roleRole必填
        viewercommentereditormanager
      • owner_idstring必填
      • root_node_idstring必填
      • journal_seqinteger必填
      • created_atTimestamp必填
      • storage_idstring
        The storage profile its files are in; absent for the server's own storage
      • forkobject
        Set when the space is a fork
        › 4 个字段
        • from_space_idstring必填
        • pathstring必填
          The folder of the original it copies ("/" for all of it)
        • at_seqinteger必填
          The original's journal position when it was forked
        • copyobject
          Set for a fork made with copy: while copying it still shares the original's files; once done it keeps its own
          › 4 个字段
          • statestring必填
            copyingdonefailed
          • copiedinteger必填
            Chunks copied so far
          • copied_bytesinteger必填
          • errorstring
            Why it failed; POST …/fork/copy/retry tries again
      • workspace_idstring必填
        The workspace this drive belongs to (ADR 0049): its members, roles, plan and storage. Opaque; a fork has its original's
      • workspace_namestring
      • workspace_roleWorkspaceRole
        viewercommentereditoradminowner
      • lockedstring
        Set when the workspace is on the free plan of a server that takes payments: everything in the drive answers 402 until it pays
        plan_required
请求示例
curl "https://side.space/v1/spaces" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "items": [
    {
      "id": "id",
      "name": "A001_C003.mov",
      "role": "viewer",
      "owner_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
      "root_node_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
      "journal_seq": 1,
      "created_at": "2026-11-14T09:30:00Z",
      "storage_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
      "fork": {},
      "workspace_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
      "workspace_name": "workspace_name",
      "workspace_role": "viewer",
      "locked": "plan_required"
    }
  ]
}

POST/v1/spaces

Create a space (the caller becomes its manager)
Bearer 令牌

请求体CreateSpaceRequest application/json

  • namestring必填
  • storage_idstring
    A storage profile to keep its files in: mine, or the organization's. While the server takes payments, a bucket of mine needs a paid plan (403 plan_required): make the space, then send the bucket with its Checkout.
  • org_idstring
    Make it in this organization (an admin there); it goes to the organization's default storage

响应

请求示例
curl -X POST "https://side.space/v1/spaces" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"A001_C003.mov"}'
响应示例 · 201
{
  "id": "id",
  "name": "A001_C003.mov",
  "role": "viewer",
  "owner_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "root_node_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "journal_seq": 1,
  "created_at": "2026-11-14T09:30:00Z",
  "storage_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "fork": {
    "from_space_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
    "path": "Ep01/Shots/A001_C003.mov",
    "at_seq": 1,
    "copy": {
      "state": "copying",
      "copied": 1,
      "copied_bytes": 1,
      "error": "error"
    }
  },
  "workspace_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "workspace_name": "workspace_name",
  "workspace_role": "viewer",
  "locked": "plan_required"
}

GET/v1/space

The calling token's own space (a token made for one space)
Bearer 令牌

Every /v1/spaces/{sid} and /v1/spaces/{sid}/… path also answers at /v1/space and /v1/space/… for a token made for one space, with the same scopes and answers, e.g. GET /v1/space/paths/cuts/a.mov. Other credentials get 400 space_required.

响应

  • 200
    Space
    Space
  • 400
    space_required: this credential reaches more than one space; use /v1/spaces/{sid}
  • 4xx/5xx
    Error
    Error
请求示例
curl "https://side.space/v1/space" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "id": "id",
  "name": "A001_C003.mov",
  "role": "viewer",
  "owner_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "root_node_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "journal_seq": 1,
  "created_at": "2026-11-14T09:30:00Z",
  "storage_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "fork": {
    "from_space_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
    "path": "Ep01/Shots/A001_C003.mov",
    "at_seq": 1,
    "copy": {
      "state": "copying",
      "copied": 1,
      "copied_bytes": 1,
      "error": "error"
    }
  },
  "workspace_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "workspace_name": "workspace_name",
  "workspace_role": "viewer",
  "locked": "plan_required"
}

GET/v1/spaces/{sid}

Bearer 令牌

参数 · 路径

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

响应

请求示例
curl "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "id": "id",
  "name": "A001_C003.mov",
  "role": "viewer",
  "owner_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "root_node_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "journal_seq": 1,
  "created_at": "2026-11-14T09:30:00Z",
  "storage_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "fork": {
    "from_space_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
    "path": "Ep01/Shots/A001_C003.mov",
    "at_seq": 1,
    "copy": {
      "state": "copying",
      "copied": 1,
      "copied_bytes": 1,
      "error": "error"
    }
  },
  "workspace_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "workspace_name": "workspace_name",
  "workspace_role": "viewer",
  "locked": "plan_required"
}

PATCH/v1/spaces/{sid}

Rename, or choose where its files are while it has none (manager)
Bearer 令牌

参数 · 路径

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

请求体PatchSpaceRequest application/json

  • namestring
  • storage_idstring
    A storage profile the caller may use, or empty for the server's own storage. Only while the space has no files (409: move them with POST /v1/spaces/{sid}/storage/moves). While the server takes payments, a person's own bucket needs a paid plan (403 plan_required).

响应

请求示例
curl -X PATCH "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"A001_C003.mov","storage_id":"nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"}'
响应示例 · 200
{
  "id": "id",
  "name": "A001_C003.mov",
  "role": "viewer",
  "owner_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "root_node_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "journal_seq": 1,
  "created_at": "2026-11-14T09:30:00Z",
  "storage_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "fork": {
    "from_space_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
    "path": "Ep01/Shots/A001_C003.mov",
    "at_seq": 1,
    "copy": {
      "state": "copying",
      "copied": 1,
      "copied_bytes": 1,
      "error": "error"
    }
  },
  "workspace_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
  "workspace_name": "workspace_name",
  "workspace_role": "viewer",
  "locked": "plan_required"
}

DELETE/v1/spaces/{sid}

Delete a drive that never held anything (no files, history or forks; 409 otherwise), as S3 DeleteBucket does. An admin of its workspace, or whoever made it if it is a fork.
Bearer 令牌

参数 · 路径

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

响应

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

GET/v1/spaces/{sid}/members

Bearer 令牌

参数 · 路径

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

响应

  • 200
    Members
    object
    › 展开字段
    • itemsMember[]
      › 4 个字段
      • userUser必填
        › 4 个字段
        • idstring必填
        • emailstring必填
          Agents have an address at agents.invalid: it finds them for invites, no mail goes there
        • display_namestring必填
        • kindstring必填
          humanagent
      • workspace_roleWorkspaceRole
        viewercommentereditoradminowner
      • rolestring必填
        Their role (a WorkspaceRole under /v1/workspaces, a Role under /v1/spaces)
      • direct_roleRole | any
        The same as role. Before ADR 0052 null for someone there only through a team
请求示例
curl "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/members" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "items": [
    {
      "user": {},
      "workspace_role": "viewer",
      "role": "role",
      "direct_role": "viewer"
    }
  ]
}

POST/v1/spaces/{sid}/members

Invite by email (manager). Creates the user record if needed and sends a space.invited notification.
Bearer 令牌

参数 · 路径

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

请求体AddMemberRequest application/json

  • emailstring必填
  • roleRole必填
    viewercommentereditormanager

响应

请求示例
curl -X POST "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/members" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"mei@studio.example","role":"viewer"}'
响应示例 · 201
{
  "user": {
    "id": "id",
    "email": "mei@studio.example",
    "display_name": "display_name",
    "kind": "human"
  },
  "workspace_role": "viewer",
  "role": "role",
  "direct_role": "viewer"
}

PATCH/v1/spaces/{sid}/members/{uid}

Change role (manager). The last manager cannot be demoted.
Bearer 令牌

参数 · 路径

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

请求体PatchMemberRequest application/json

  • roleRole必填
    viewercommentereditormanager

响应

请求示例
curl -X PATCH "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/members/usr_01JD7Q1Z3X5V7T9R1P3N5L7J9H" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"role":"viewer"}'
响应示例 · 200
{
  "user": {
    "id": "id",
    "email": "mei@studio.example",
    "display_name": "display_name",
    "kind": "human"
  },
  "workspace_role": "viewer",
  "role": "role",
  "direct_role": "viewer"
}

DELETE/v1/spaces/{sid}/members/{uid}

Remove a member (manager, or the member themself)
Bearer 令牌

参数 · 路径

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

响应

  • 204
    Removed
  • 4xx/5xx
    Error
    Error
请求示例
curl -X DELETE "https://side.space/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/members/usr_01JD7Q1Z3X5V7T9R1P3N5L7J9H" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"