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

Updating File Tag or Category

PDF
フォーカスモード
フォントサイズ
最終更新日: 2026-01-07 14:15:09

Description

Tags for updating files or categorization.
Note:
Requires admin permissions or spaceAdmin permissions. For details on permissions, see Generate Access Token Interface.

Request

Request Example

POST /api/v1/directory/{LibraryId}/{SpaceId}/{FilePath}?update&access_token={AccessToken}

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 a hyphen (`-`). If the media library is in multi-tenant mode, you must specify this parameter. For details, see create tenant space.
String
No
FilePath
File path
String
No
AccessToken
Access token. For Public Read Media Library or tenant space, this parameter is not specified. Otherwise, you must specify this parameter. For details, see generate access token.
String
Yes

Request Body

{
"labels": ["animal", "elephant", "Asian elephant"],
"category": "image",
"localCreationTime": "2022-07-26T02:58:09Z",
"localModificationTime": "2022-07-26T02:58:09Z"
}
Request body field description:
Request parameters.
Description
Type
Required or Not
labels
File tag list, such as elephant
String Array
No
category
Customized category of files, with a maximum length of 16 bytes. Users can modify file classification through the file API or select based on file suffix to predefine classification information.
String
No
localCreationTime
The local creation time of the file, a timestamp string
String
No
localModificationTime
The local modification time of the file, a timestamp string
String
No

Response

Response code

Successful retrieval, returns HTTP 204 NO CONTENT.

Response Body

This request has no response body.

Error Codes

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

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック