获取文档权限角色列表
适用版本>=v7.0.2308b.20230824
接口说明:获取权限角色列表
请求说明
| 请求地址 | 配置域名+/graph+/v7/drives/{drive_id}/roles |
|---|---|
| 请求方法 | GET |
| 签名方式 | WPS-4签名/WPS-4-GM签名(配置域名+/graph不参与签名) |
| 权限要求 | 更新文件角色权限(用户授权) kso.drive.role.write 应用查询文档权限角色(应用授权) kso.appdrive.role.read |
请求头(Header)
| 名称 | 是否必填 | 说明 |
|---|---|---|
| Content-Type | 是 | 固定为: application/json |
| Wps-Docs-Date | 是 | 取当前时间, 示例: Wed, 23 Jan 2013 06:43:08 GMT |
| Wps-Docs-Authorization | 是 | 计算方法参考签名说明 |
| Authorization | 是 | 授权凭证,格式为: Bearer {access_token} |
路径参数(Path)
| 名称 | 参数类型 | 是否必填 | 说明 |
|---|---|---|---|
| drive_id | string | 是 | 驱动盘id,<= 1024 characters |
响应体(Response)
| 名称 | 类型 | 说明 |
|---|---|---|
| code | integer | code |
| detail | string | detail |
| msg | string | msg |
| data | object | 列表信息 |
| ∟ items | object[] | 角色列表,<= 1024 items |
| ∟ ∟ id | string | 角色id,<= 1024 characters |
| ∟ ∟ name | string | 角色名称,<= 1024 characters |
| ∟ ∟ permissions | object | 权限(待废弃,推荐使用permission_bits) |
| ∟ ∟ ∟ comment | bool | 评论 |
| ∟ ∟ ∟ copy | bool | 复制 |
| ∟ ∟ ∟ copy_content | bool | 复制内容 |
| ∟ ∟ ∟ delete | bool | 删除 |
| ∟ ∟ ∟ download | bool | 下载 |
| ∟ ∟ ∟ list | bool | 列表 |
| ∟ ∟ ∟ move | bool | 移动 |
| ∟ ∟ ∟ new_empty | bool | 新建 |
| ∟ ∟ ∟ perm_ctl | bool | 权限控制 |
| ∟ ∟ ∟ preview | bool | 预览 |
| bool | 打印 | |
| ∟ ∟ ∟ rename | bool | 重命名 |
| ∟ ∟ ∟ share | bool | 分享 |
| ∟ ∟ ∟ update | bool | 更新 |
| ∟ ∟ ∟ upload | bool | 上传 |
| ∟ ∟ permission_bits | object | 权限 |
| ∟ ∟ ∟ comment | bool | 评论 |
| ∟ ∟ ∟ copy | bool | 复制 |
| ∟ ∟ ∟ copy_content | bool | 复制内容 |
| ∟ ∟ ∟ delete | bool | 删除 |
| ∟ ∟ ∟ download | bool | 下载 |
| ∟ ∟ ∟ list | bool | 列表 |
| ∟ ∟ ∟ move | bool | 移动 |
| ∟ ∟ ∟ new_empty | bool | 新建 |
| ∟ ∟ ∟ perm_ctl | bool | 权限控制 |
| ∟ ∟ ∟ preview | bool | 预览 |
| bool | 打印 | |
| ∟ ∟ ∟ rename | bool | 重命名 |
| ∟ ∟ ∟ share | bool | 分享 |
| ∟ ∟ ∟ update | bool | 更新 |
| ∟ ∟ ∟ upload | bool | 上传 |
| ∟ ∟ type | string | Enum: “custom” 角色类型 |
响应体示例
{
"data": {
"items": [
{
"id": "string",
"name": "string",
"permissions": {
"comment": true,
"copy": true,
"copy_content": true,
"delete": true,
"download": true,
"list": true,
"move": true,
"new_empty": true,
"perm_ctl": true,
"preview": true,
"print": true,
"rename": true,
"share": true,
"update": true,
"upload": true
},
"permission_bits": {
"comment": true,
"copy": true,
"copy_content": true,
"delete": true,
"download": true,
"list": true,
"move": true,
"new_empty": true,
"perm_ctl": true,
"preview": true,
"print": true,
"rename": true,
"share": true,
"update": true,
"upload": true
},
"type": "custom"
}
]
},
"code": 0,
"detail": "string",
"msg": "string"
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48