Skip to content

获取文档权限角色列表

适用版本>=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_idstring驱动盘id,<= 1024 characters

响应体(Response)

名称类型说明
codeintegercode
detailstringdetail
msgstringmsg
dataobject列表信息
itemsobject[]角色列表,<= 1024 items
idstring角色id,<= 1024 characters
namestring角色名称,<= 1024 characters
permissionsobject权限(待废弃,推荐使用permission_bits)
commentbool评论
copybool复制
copy_contentbool复制内容
deletebool删除
downloadbool下载
listbool列表
movebool移动
new_emptybool新建
perm_ctlbool权限控制
previewbool预览
printbool打印
renamebool重命名
sharebool分享
updatebool更新
uploadbool上传
permission_bitsobject权限
commentbool评论
copybool复制
copy_contentbool复制内容
deletebool删除
downloadbool下载
listbool列表
movebool移动
new_emptybool新建
perm_ctlbool权限控制
previewbool预览
printbool打印
renamebool重命名
sharebool分享
updatebool更新
uploadbool上传
typestringEnum: “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"
}