获取订阅状态
根据订阅ID获取该订阅的状态
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id |
| HTTP Method | GET |
| 接口频率限制 | 1000 次/分钟、50 次/秒 |
| 支持的应用类型 | custom,isv |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 开启任一权限即可 | docs:document.subscription:read 获取云文档订阅状态 drive:drive 查看、评论、编辑和管理云空间中所有文件 drive:drive:readonly 查看、评论和下载云空间中所有文件 |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | user_access_token 值格式:"Bearer access_token" 示例值:"Bearer u-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token |
| Content-Type | string | 是 | 固定值:"application/json; charset=utf-8" |
路径参数
| 名称 | 类型 | 描述 |
|---|---|---|
file_token | string | 文档token 示例值:"doxcnxxxxxxxxxxxxxxxxxxxxxx" |
subscription_id | string | 订阅关系ID 示例值:"1234567890987654321" |
请求体
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
file_type | string | 是 | 文档类型 示例值:"doc" 可选值有: - doc: 旧版文档 - docx: 新版文档 - wiki: 云空间 |
请求体示例
json
{"file_type":"docx"}响应
响应体
| 名称 | 类型 | 描述 |
|---|---|---|
code | int | 错误码,非 0 表示失败 |
msg | string | 错误描述 |
data | \- | - |
└ subscription_id | string | 订阅关系ID |
└ subscription_type | string | 订阅类型 可选值有: - comment_update: 评论更新 |
└ is_subcribe | boolean | 是否订阅 |
└ file_type | string | 文档类型 可选值有: - doc: 旧版文档 - docx: 新版文档 - wiki: 知识库 |
响应体示例
json
{
"code": 0,
"data": {
"file_type": "docx",
"is_subcribe": false,
"subscription_id": "xxxxxxxx",
"subscription_type": "comment_update"
},
"msg": "success"
}错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 400 | 1064000 | Illegal parameter | 检查参数有效性 |
| 403 | 1064030 | Permission denied | 检查文档权限,订阅评论至少需要阅读的权限 |
| 404 | 1064040 | Token not exist | 检查文档是否能正常访问 |
| 500 | 1065000 | Internal Server Error | 重试,若稳定失败请联系相关业务方oncall人员 |
