Adds custom tags to a file.
Operation description
This operation is an incremental update operation. Take note of the following items:
- If a tag name specified in the request is the same as an existing tag name, the existing tag is overwritten.
- If a tag name specified in the request is different from the existing tag names, the specified tag is added.
- The existing tags with unique names are not affected.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request syntax
POST /v2/file/put_usertags HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| body | object | No | The request parameters. | |
| drive_id | string | Yes | The drive ID. | 1 |
| file_id | string | Yes | The file ID. | 9520943DC264 |
| user_tags | array<object> | Yes | The tags to be added to the file. You cannot leave this parameter empty. You can specify up to 1,000 tags. You cannot specify tags that have the same name. | |
| object | Yes | |||
| key | string | Yes | The name of the tag. The tag name cannot be empty and cannot contain number signs (#). | |
| value | string | No | The value of the tag. The tag value cannot contain number signs (#). |
Response parameters
Examples
Sample success responses
JSONformat
{
"file_id": "9520943DC264"
}Error codes
For a list of error codes, visit the Service error codes.
