分享管理API接口
管理分享分享链接
获取分享列表
http
GET /openapi/share
响应:Pagination<Share[]
>
获取分享详情
http
GET /openapi/share/:id
路径参数:id
分享ID
响应:Share
添加分享
http
POST /openapi/share
请求体参数:
字段名 | 类型 | 可空 | 说明 |
---|---|---|---|
code | string | 否 | 链接后缀 |
account_type | all | point | tag | 否 | 分享账号类型 all 全部账号, point 指定账号, tag 指定标签的账号 |
apple_tag_id | number | 是 | 关联的标签ID,account_type为tag时必填 |
account_ids | number[] | 是 | 分享的账号ID,account_type为point时必填 |
password | string | 是 | 分享访问密码 |
max_account_count | number | 是 | 最大可分享账号数量 |
expire_time | string | 是 | 分享过期时间,为空则永不过期 |
remark | string | 是 | 备注信息 |
apple_share_template_id | number | 是 | 使用的页面模板 ID |
更新分享
http
PUT /openapi/share/:id
路径参数:id
分享ID
请求体参数:
字段名 | 类型 | 可空 | 说明 |
---|---|---|---|
code | string | 否 | 链接后缀 |
account_type | all | point | tag | 否 | 分享账号类型 all 全部账号, point 指定账号, tag 指定标签的账号 |
apple_tag_id | number | 是 | 关联的标签ID,account_type为tag时必填 |
account_ids | number[] | 是 | 分享的账号ID,account_type为point时必填 |
password | string | 是 | 分享访问密码 |
max_account_count | number | 是 | 最大可分享账号数量 |
expire_time | string | 是 | 分享过期时间,为空则永不过期 |
remark | string | 是 | 备注信息 |
apple_share_template_id | number | 是 | 使用的页面模板 ID |
删除分享
http
DELETE /openapi/share/:id
路径参数:id
分享ID
示例
bash
curl -X DELETE http://localhost:3000/share/1