Replace the tags on a Cloud Storage file.
- Preconditions: one
fileIdper call, andtagIdsmust be non-empty and reference Cloud Storage tags belonging to your team. Profile tags are rejected. - Effect: tags not present in the request are removed from the file and missing ones are added. There is no way to clear all tags here because an empty list is rejected.
- Completion: synchronous and idempotent for the same body.
Documented business errors: 39011, 39048, 39049. See Error Codes for what each code means. Any operation can additionally return the common codes.
POST
curl -i -X POST \
http://127.0.0.1:40000/api/cloudstorage/file/tag/set \
-H 'Content-Type: application/json' \
-d '{
"fileId": "1800000000001001",
"tagIds": [
"1800000000000101",
"1800000000000102"
]
}'Success
Operation request ID. This field may be present when the request passes through the API gateway.
Example:"1d4f3ea968664593860b94b35d4ebf5e"
Response
{ "code": 0, "msg": null, "requestId": "1d4f3ea968664593860b94b35d4ebf5e", "data": null }