分享管理API接口
管理分享分享链接
获取分享列表
http
GET /openapi/share响应:Pagination<Share>
查询参数:
| 字段名 | 可空 | 说明 |
|---|---|---|
current | 否 | 分页页码 |
pageSize | 否 | 每页数量,最大100 |
keyword | 是 | 模糊搜索关键字 |
code | 是 | 后缀 |
type | 是 | share_link普通分享 tmp_link兑换链接 |
account_type | 是 | 状态值,参考Share.account_type |
获取分享详情
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