Skip to content

获取文件路径

适用版本>=v7.0.2505b.20250529

接口说明:获取文件路径

请求说明

请求地址配置域名+/openapi+/v7/drives/{drive_id}/files/{file_id}/path
请求方法GET
签名方式KSO-1(配置域名+/openapi不参与签名)
权限要求查询和管理文件(用户授权) kso.file.readwrite
查询文件(用户授权) kso.file.read

请求头(Header)

Header参数类型是否必填说明
X-Kso-DatestringRFC1123 格式的日期,例: Wed, 23 Jan 2013 06:43:08 GMT
X-Kso-AuthorizationstringKSO-1 签名值,详见《签名方法》
Authorizationstring授权凭证,格式为:Bearer {access_token}

路径参数(Path)

名称参数类型是否必填说明
drive_idstring驱动盘id,<= 1024 characters
file_idstring文件(夹)id,<= 1024 characters

响应体(Response)

名称类型说明
dataobject
location_idstring文件位置标识 当location_type为user或roaming时,对应的location_id为user_id; 当location_type为group、link时,对应的location_id分别为group_id、空串
location_typestring文件位置类型 link:共享,user:我的云文档,group:团队文档, roaming:我的设备
pathsobject[]文件路径
file_idstring文件id
namestring文件名称
codeint错误码
msgstring状态信息
detailstring详细信息

响应体示例

json
{
  "data": {
    "location_id": "string",
    "location_type": "link",
    "paths": [
      {
        "file_id": "string",
        "name": "string"
      }
    ]
  },
  "code": 0,
  "detail": "string",
  "msg": "string"
}