API 参考

Spaces

8 个接口 · 概览

GET/v1/spaces

Spaces I am a member of
Bearer 令牌

响应

  • 200
    Spaces
    object
    › 展开字段
    • itemsSpace[]
      › 10 个字段
      • 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
        › 3 个字段
        • 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
      • org_idstring
        The organization it belongs to
请求示例
curl "https://side.example.com/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": {},
      "org_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"
    }
  ]
}

POST/v1/spaces

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

请求体CreateSpaceRequest application/json

  • namestring必填
  • storage_idstring
    One of my storage profiles to keep its files in

响应

请求示例
curl -X POST "https://side.example.com/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
  },
  "org_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"
}

GET/v1/spaces/{sid}

Bearer 令牌

参数 · 路径

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

响应

请求示例
curl "https://side.example.com/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
  },
  "org_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"
}

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 of mine, or empty for the server's own storage. Only while the space has no files (409).

响应

请求示例
curl -X PATCH "https://side.example.com/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
  },
  "org_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S"
}

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
      • roleRole必填
        viewercommentereditormanager
      • direct_roleRole | any
        Their own grant; null when they are here only through teams
      • teamsMemberTeam[]
        › 3 个字段
        • idstring必填
        • namestring必填
        • roleRole必填
          viewercommentereditormanager
请求示例
curl "https://side.example.com/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/members" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "items": [
    {
      "user": {},
      "role": "viewer",
      "direct_role": "viewer",
      "teams": []
    }
  ]
}

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.example.com/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/members" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","role":"viewer"}'
响应示例 · 201
{
  "user": {
    "id": "id",
    "email": "[email protected]",
    "display_name": "display_name",
    "kind": "human"
  },
  "role": "viewer",
  "direct_role": "viewer",
  "teams": [
    {}
  ]
}

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.example.com/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": "[email protected]",
    "display_name": "display_name",
    "kind": "human"
  },
  "role": "viewer",
  "direct_role": "viewer",
  "teams": [
    {}
  ]
}

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.example.com/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/members/usr_01JD7Q1Z3X5V7T9R1P3N5L7J9H" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"