获取文件路径
适用版本>=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-Date | string | 是 | RFC1123 格式的日期,例: Wed, 23 Jan 2013 06:43:08 GMT |
| X-Kso-Authorization | string | 是 | KSO-1 签名值,详见《签名方法》 |
| Authorization | string | 是 | 授权凭证,格式为:Bearer {access_token} |
路径参数(Path)
| 名称 | 参数类型 | 是否必填 | 说明 |
|---|---|---|---|
| drive_id | string | 是 | 驱动盘id,<= 1024 characters |
| file_id | string | 是 | 文件(夹)id,<= 1024 characters |
响应体(Response)
| 名称 | 类型 | 说明 |
|---|---|---|
| data | object | |
| ∟ location_id | string | 文件位置标识 当location_type为user或roaming时,对应的location_id为user_id; 当location_type为group、link时,对应的location_id分别为group_id、空串 |
| ∟ location_type | string | 文件位置类型 link:共享,user:我的云文档,group:团队文档, roaming:我的设备 |
| ∟ paths | object[] | 文件路径 |
| ∟ ∟ file_id | string | 文件id |
| ∟ ∟ name | string | 文件名称 |
| code | int | 错误码 |
| msg | string | 状态信息 |
| detail | string | 详细信息 |
响应体示例
json
{
"data": {
"location_id": "string",
"location_type": "link",
"paths": [
{
"file_id": "string",
"name": "string"
}
]
},
"code": 0,
"detail": "string",
"msg": "string"
}