API 参考

Share links

3 个接口 · 概览

GET/v1/spaces/{sid}/shares

Bearer 令牌

参数 · 路径

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

响应

  • 200
    Shares
    object
    › 展开字段
    • itemsShare[]
      › 13 个字段
      • idstring必填
      • node_idstring必填
      • modeShareMode必填
        viewuploadrequest
      • has_passwordboolean必填
      • expires_atTimestamp | any必填
      • created_bystring必填
      • created_atTimestamp必填
      • revokedboolean必填
      • can_commentboolean
        A review link: people with it can comment on its files
      • no_downloadboolean
        Watch-only: the page previews and plays the streaming proxy but offers no download
      • titlestring | any
        What an upload request asks for
      • messagestring | any
        Details of an upload request
      • uploadsinteger
        Files people have sent through the link
请求示例
curl "https://side.example.com/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/shares" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN"
响应示例 · 200
{
  "items": [
    {
      "id": "id",
      "node_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
      "mode": "view",
      "has_password": false,
      "expires_at": "2026-11-14T09:30:00Z",
      "created_by": "created_by",
      "created_at": "2026-11-14T09:30:00Z",
      "revoked": false,
      "can_comment": false,
      "no_download": false,
      "title": "title",
      "message": "message",
      "uploads": 1
    }
  ]
}

POST/v1/spaces/{sid}/shares

Create a link (editor). The token is returned only once.
Bearer 令牌

参数 · 路径

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

请求体CreateShareRequest application/json

  • node_idstring必填
  • modeShareMode必填
    viewuploadrequest
  • passwordstring
  • expires_atTimestamp
  • can_commentboolean
    A review link: anyone with it can comment, under a name they give
  • no_downloadboolean
    Watch-only: no downloads; videos play their streaming proxy, and originals the browser cannot show are not served
  • titlestring
    Mode request (required there): what files you are asking for
    ≤ 200 chars
  • messagestring
    Mode request: details for the senders
    ≤ 4000 chars

响应

请求示例
curl -X POST "https://side.example.com/v1/spaces/spc_01JD7Q2M8X4V6N0R3T5W9Y1B2C/shares" \
  -H "Authorization: Bearer $SIDESPACE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"node_id":"nod_01JD7Q3A5C7E9G1J3K5M7P9R2S","mode":"view"}'
响应示例 · 201
{
  "share": {
    "id": "id",
    "node_id": "nod_01JD7Q3A5C7E9G1J3K5M7P9R2S",
    "mode": "view",
    "has_password": false,
    "expires_at": "2026-11-14T09:30:00Z",
    "created_by": "created_by",
    "created_at": "2026-11-14T09:30:00Z",
    "revoked": false,
    "can_comment": false,
    "no_download": false,
    "title": "title",
    "message": "message",
    "uploads": 1
  },
  "token": "token",
  "url": "https://hooks.example.com/side"
}

DELETE/v1/spaces/{sid}/shares/{id}

Revoke a link (editor)
Bearer 令牌

参数 · 路径

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

响应

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