Adds custom tags to a file.
Operation description
This operation performs an incremental update:
-
If a tag with the same key already exists, its value is overwritten.
-
If a tag does not exist, it is added.
-
Existing tags with different keys are not affected.
Try it now
Test
RAM authorization
Request syntax
POST /v2/file/put_usertags HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| domain_id |
string |
Yes |
||
| body |
object |
No |
The request body. |
|
| drive_id |
string |
Yes |
The drive ID. |
1 |
| file_id |
string |
Yes |
The file ID. |
9520943DC264 |
| user_tags |
array<object> |
Yes |
The array of tags to add. The array must contain 1 to 1,000 tags and must not contain duplicate tag keys. |
|
|
object |
Yes |
The combined length of the tag key and tag value cannot exceed 2,000 bytes. |
||
| key |
string |
Yes |
The tag key. Must not be empty or contain the # character. |
tag |
| value |
string |
No |
The tag value. Must not contain the # character. |
value |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| file_id |
string |
The file ID. |
9520943DC264 |
Examples
Success response
JSON format
{
"file_id": "9520943DC264"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.