获取文件路径
适用版本>=v7.0.2407a.20240711
接口说明:获取文件路径
请求说明
| 请求地址 | 配置域名+/graph+/v7/drives/{drive_id}/files/{file_id}/path |
|---|---|
| 请求方法 | GET |
| 签名方式 | WPS-4签名/WPS-4-GM签名(配置域名+/graph不参与签名) |
| 权限要求 | 更新文件(用户授权) kso.file.write 应用查询文件(应用授权) kso.appdrive.file.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 |
| 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 | integer | 错误码,参照《错误码说明》 |
| msg | string | 状态信息 |
| detail | string | 详细信息 |
响应体示例
{
"data": {
"location_id": "string",
"location_type": "link",
"paths": [
{
"file_id": "string",
"name": "string"
}
]
},
"code": 0,
"detail": "string",
"msg": "string"
}