批量获取文件信息
适用版本>=v7.0.2312b.20231221
接口说明:批量获取文件信息
请求说明
| 请求地址 | 配置域名+/graph+/v7/files/batch_get_meta |
|---|---|
| 请求方法 | POST |
| 签名方式 | WPS-4签名/WPS-4-GM签名(配置域名+/graph不参与签名) |
| 权限要求 | 更新文件(用户授权) kso.file.write 查询文件(用户授权) kso.file.read 应用查询文件(应用授权) 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} |
请求体(Body)
| 名称 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| file_ids | string[] | 是 | 文件ids,<= 1024 items [ items <= 1024 characters ] |
请求体示例
{
"file_ids": [
"string"
]
}响应体(Response)
| 名称 | 类型 | 说明 |
|---|---|---|
| code | integer | 错误码 |
| detail | string | 详细信息 |
| msg | string | 状态信息 |
| data | object | |
| ∟ items | object[] | 数据集合,<= 1024 items |
| ∟ ∟ id | string | 文件id |
| ∟ ∟ drive_id | string | 驱动盘id |
| ∟ ∟ parent_id | string | 父文件id |
| ∟ ∟ created_by | object | 创建者信息 |
| ∟ ∟ ∟ avatar | string | 创建者头像,<= 1024 characters |
| ∟ ∟ ∟ company_id | string | 创建者企业id,<= 1024 characters |
| ∟ ∟ ∟ id | string | 创建者id,<= 1024 characters |
| ∟ ∟ ∟ name | string | 创建者名称,<= 1024 characters |
| ∟ ∟ ∟ type | string | 创建者身份类型,user:用户 |
| ∟ ∟ modified_by | object | 修改者信息 |
| ∟ ∟ ∟ avatar | string | 修改者头像,<= 1024 characters |
| ∟ ∟ ∟ company_id | string | 修改者企业id,<= 1024 characters |
| ∟ ∟ ∟ id | string | 修改者id,<= 1024 characters |
| ∟ ∟ ∟ name | string | 修改者名称,<= 1024 characters |
| ∟ ∟ ∟ type | string | 修改者身份类型,user:用户 |
| ∟ ∟ size | int64 | 文件大小 |
| ∟ ∟ version | int | 文件版本 |
| ∟ ∟ type | string | 文件类型,folder:文件夹;file:文件 |
| ∟ ∟ name | string | 文件名称 |
| ∟ ∟ ctime | int64 | 文件创建时间,时间戳,单位为秒 |
| ∟ ∟ mtime | int64 | 文件修改时间,时间戳,单位为秒 |
| ∟ ∟ hash | object | 文件哈希信息 |
| ∟ ∟ ∟ sum | string | 哈希结果 |
| ∟ ∟ ∟ type | string | 哈希类型,固定为s2s |
| ∟ ∟ ext_attrs | object[] | 文件扩展属性 |
| ∟ ∟ ∟ name | string | 属性名 |
| ∟ ∟ ∟ value | string | 属性值 |
| ∟ ∟ permission | object | 文件权限 |
| ∟ ∟ link_url | string | 分享链接 |
| ∟ ∟ link_id | string | 分享链接id |
响应体示例
{
"data": {
"items": [
{
"created_by": {
"avatar": "string",
"company_id": "string",
"id": "string",
"name": "string",
"type": "user"
},
"ctime": 0,
"drive_id": "string",
"ext_attrs": [
{
"name": "string",
"value": "string"
}
],
"hash": {
"sum": "string",
"type": "s2s"
},
"id": "string",
"link_id": "string",
"link_url": "string",
"modified_by": {
"avatar": "string",
"company_id": "string",
"id": "string",
"name": "string",
"type": "user"
},
"mtime": 0,
"name": "string",
"parent_id": "string",
"permission": {
"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
},
"size": 0,
"type": "folder",
"version": 0
}
]
},
"code": 0,
"detail": "string",
"msg": "string"
}