Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
GET /api/v1/directory/`{LibraryId}`/`{SpaceId}`/`{DirPath}`?info&with_inode=`{WithInode}`&access_token=`{AccessToken}`&with_favorite_status=`{WithFavoriteStatus}`
Request parameters. | Description | Type | Required or Not |
LibraryId | Media Library ID, obtained after creating a media library in the media hosting console. See create media library | String | Yes |
SpaceId | Space ID. If the media library is in single-tenant mode, this parameter is fixed as a hyphen ( -). If the media library is in multi-tenant mode, you must specify this parameter. For retrieval, please refer to create tenant space. | String | No |
DirPath | directory path or album name. For multi-level directories, use a slash ( /) to separate, such as foo/bar; for the root directory, leave this parameter blank. | String | No |
WithInode | 0 or 1, whether to return inode (file directory ID), default do not return | String | No |
AccessToken | Access token. For Public Read Media Library or tenant space, this parameter is not specified, otherwise must specify this parameter. See generate access token | String | No |
WithFavoriteStatus | 0 or 1, whether to return favorite status, default do not return | String | No |
{"path":["xxx","yyy"],"name": "file1.jpg","type": "file","userId": "23","creationTime": "2020-09-22T07:44:45.000Z","modificationTime": "2020-09-22T07:44:45.000Z","contentType": "image/jpg","size": "1048576","eTag": "\\"b581c674266a2b0ff16a9505b4c52300\\"","crc64": "16293198345556339838","versionId": 23,"historySize": "2323","metaData": {"x-smh-meta-foo": "bar"},"previewByDoc": true,"previewByCI": true,"previewAsIcon": true,"fileType": "powerpoint","localSync": {"syncId": 4,"strategy": "local_to_cloud","isSyncRootFolder": true,"syncUserId": "123"}}
Response Parameters | Description | Type |
path | full path | Array |
inode | File directory ID | String |
name | directory or album name or file name | String |
type | Entry type dir: directory or album file: file, only used for file type media library image: image, only used for media type media library. video: video, only used for media type media library. symlink: symbolic link. | String |
userId | Creator ID | String |
creationTime | ISO 8601 formatted date and time string, indicating the creation time of a directory or album or the upload time of a file, such as 2020-10-14T10:17:57.953Z | String |
modificationTime | The last time the file was overwritten, or the last time a subdirectory or file was added or removed in the directory | String |
contentType | Media type (returned for non-directory or non-album only) | String |
size | File size. | String |
eTag | eTag of directory or file | String |
isFavorite | Whether it is a favorite (returned when WithFavoriteStatus = 1) | Boolean |
crc64 | CRC64-ECMA182 check value of the file | String |
versionId | version number (returned only for non-directory or non-album) | String |
metaData | file metadata information (returned only for non-directory or non-album) | String |
previewByDoc | whether preview via wps is supported (returned only for non-directory or non-album) | Boolean |
previewByCI | whether preview via Wanxiang is supported (returned only for non-directory or non-album) | Boolean |
previewAsIcon | whether the preview image can be used as an icon (returned only for non-directory or non-album) | Boolean |
fileType | File type: Excel, PowerPoint (returned only for non-directory or non-album) | String |
labels | Simplified file tag list, different from tagList, is actually designated when uploading or modifying files. | Array |
category | Customized file category | Int |
linkTo | The inode of the file the symbolic link points to, returned when the file is a symbolic link. | String |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback