功能描述
批量获取文件或文件夹属性信息。
请求
请求示例
POST /user/v1/directory/
{OrganizationId}
/{SpaceId}
?user_token={UserToken}
请求参数:
OrganizationId:组织 ID,必选参数。
SpaceId:空间 ID,必选参数。
请求体
application/json
请求体示例:
[{"path":"hello.js"}]
请求体字段说明:
path 文件路径,必选参数。
响应
响应码
获取成功,返回 HTTP 200 OK。
响应体
application/json
响应体示例:
[{"isExist":true,"name": "sub-dir1","path":["xxx","xxx"],"type": "dir","creationTime": "2020-09-22T07:43:01.000Z","modificationTime": "2020-09-22T07:43:01.000Z","versionId":2,"authorityList": {"canView": false,"canPreview": false,"canDownload": false,"canUpload": false,"canDelete": false,"canModify": false,"canAuthorize": false,"canShare": false}},{"isExist":true,"name": "sub-dir2","type": "dir","creationTime": "2020-09-22T07:43:14.000Z","modificationTime": "2020-09-22T07:43:14.000Z"},{"isExist":true,"name": "file1.jpg","type": "file","creationTime": "2020-09-22T07:44:45.000Z","modificationTime": "2020-09-22T07:44:45.000Z","contentType": "image/jpg","size": "1048576","eTag": "xxx","crc64": "xxx","authorityList": {"canView": false,"canPreview": false,"canDownload": false,"canUpload": false,"canDelete": false,"canModify": false,"canAuthorize": false,"canShare": false},"metaData": {"x-smh-meta-foo": "bar"},"previewByDoc": true,"previewByCI": true,"previewAsIcon": true,"fileType": "powerpoint",},{"isExist":true,"name": "file2.docx","type": "file","creationTime": "2020-09-22T07:46:08.000Z","modificationTime": "2020-09-22T07:46:08.000Z","contentType": "application/vnd.openxmlformats-officedocument.wordprocessingm","size": "1048576","eTag": "xxx","crc64": "xxx","metaData": {"x-smh-meta-foo": "bar"},"previewByDoc": true,"previewByCI": true,"previewAsIcon": true,"fileType": "powerpoint",}]
响应体字段说明:
isExist:布尔值,是否存在。
name:字符串,文件名称。
type:字符串,文件类型。
creationPerson:创建人昵称。
size:字符串,文件大小。
historySize:字符串,历史版本文件大小。
creationTime:日期字符串,创建时间。
modificationTime:日期字符串,修改时间。
path:数组,文件路径。
spaceTag:字符串,
personal | team
。teamPath:字符串数组,如果是团队空间,则列出团队路径。