Skip to content

分享 shares

为设计稿的某个版本创建可分享的公开链接。

GET /api/designs/:id/shares

列出设计稿的所有分享链接。

鉴权:需 Authorization: Bearer <JWT>,调用者须为该设计稿所属组织成员。

响应 200

json
{ "shares": [{ "id": "...", "shareId": "...", "expiresAt": null, "encrypted": false }] }

POST /api/designs/:id/shares

为指定版本创建分享链接。

鉴权:需 Authorization: Bearer <JWT>,调用者须为该设计稿所属组织成员。

请求体(JSON)

字段类型必填说明
versionIdstring要分享的版本 ID
encryptedboolean是否密码加密,默认 false
passwordstring加密时的访问密码
expiresAtstring过期时间(ISO 8601),null 表示永不过期

响应 201

json
{ "share": { "id": "...", "shareId": "...", "encrypted": false, "expiresAt": null } }

DELETE /api/shares/:id

删除分享链接。

鉴权:需 Authorization: Bearer <JWT>,调用者须为该分享所属设计稿所属组织成员。

响应 200

json
{ "ok": true }

公开访问(无需登录)

分享链接公开托管在 /p 前缀下,无需任何鉴权即可访问。

GET /p/:shareId/*

访问分享的原型静态资源。若该分享设置了密码保护,直接访问会重定向到解锁页。

POST /p/:shareId/unlock

解锁密码保护的分享,提交正确密码后可访问。

请求体(JSON)

字段类型说明
passwordstring分享访问密码