tencent cloud

Smart Media Hosting

Product Introduction
Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
Purchase Guide
Quick Start
Create Media Library
Initiate request
Service Level API Document
History
Introduction
API Category
Making API Requests
PaaS Service APIs
Official Cloud Disk APIs
Data Types
Error Codes
Business Level API Document
Introduction
Access Token Operation API
Tenant Space Operation API
File Operation API
Directory or Album Operation API
Recycle Bin Operation API
Quota Operation API
Query Task Operation API
Search Operation API
Historical Version Operations API
Directory and File Batch Operation API
Collection Operation API
Error Codes
SDK Documentation
Android SDK
iOS SDK
HarmonyOS SDK
FAQs
Enterprise Network Disk
Product Introduction
Purchase Guide
Quick Start
FAQs
Service Level Agreement
Glossary

Viewing File Details

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-01-07 14:15:08

Description

View file details.
Note:
This interface can be used to view file or folder details. If the path is a file, it returns file details; if it is a folder, it returns folder details.

Request

Request Example

GET /api/v1/directory/`{LibraryId}`/`{SpaceId}`/`{FilePath}`?info&access_token=`{AccessToken}`&with_inode=`{WithInode}`&with_favorite_status=`{WithFavoriteStatus}`

Request Parameter

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 hyphen (`-`); if the media library is in multi-tenant mode, you must specify this parameter. See Create Tenant Space
String
No
FilePath
complete file path, such as foo/bar2/file.docx
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, specify this parameter to obtain. See Generate Access Token
String
No
WithFavoriteStatus
0 or 1, whether to return favorite status, default do not return
String
No

Request Body

Null

Response code

Successfully obtained, return HTTP 200 OK.

Response Body

application/json
Response body example:
{
"path": [ "root", "folder" ],
"inode": "xxxx",
"name": "folder",
"type": "dir",
"userId": "123",
"userOrgId":"",
"creationTime": "2020-09-22T07:44:45.000Z",
"modificationTime": "2020-09-22T07:44:45.000Z",
"versionId": 23,
"size": "1048576",
"eTag": "xxx",
"isFavorite": true,
"crc64": "xxx",
"contentType": "image/jpg",
"metaData": {
"x-smh-meta-foo": "bar"
},
"fileType": "powerpoint",
"previewByDoc": true,
"previewByCI": true,
"previewAsIcon": true,
"labels": ["animal", "elephant", "Asian elephant"],
"category": "zip",
"localCreationTime": "2022-07-26T02:58:09.000Z",
"localModificationTime": "2022-07-26T02:58:09.000Z",
"linkTo": "968fcbb5013759a40006375657764f4e"
}
Response body field description:
Response Parameters
Description
Type
path
full path
String 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
userOrgId
creator ID
String
creationTime
ISO 8601 formatted date and time string, indicating file creation time or file upload time, 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
versionId
Version number, which may be null
String
size
File size, in string format to avoid accuracy issues
String
eTag
eTag of the file
String
isFavorite
Whether it is a favorite, returned when WithFavoriteStatus = 1
Boolean
crc64
CRC64-ECMA182 check value of the file, in string format to avoid accuracy issues
String
contentType
media type
String
metaData
file metadata information
String
fileType
File type: Excel, PowerPoint
String
previewByDoc
whether WPS can preview
Boolean
previewByCI
whether Wanxiang can preview
Boolean
previewAsIcon
Use preview image as icon
Boolean
labels
Simplified file tag list, different from tagList, is actually specified when uploading or modifying files.
String Array
category
Customized file category
String
localCreationTime
File Local Creation Time
String
localModificationTime
File Local Modification Time
String
linkTo
Symbolic link file inode
String

Error Codes

This request operation has no special error messages. For common error messages, see Error Codes.


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan