Skip to main content

Batch Update File Tags

Update tags on multiple files in one call. Supports overwrite and append modes.

POST
/api/v1/connector/dash/batchUpdateFileTag
cURL
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/connector/dash/batchUpdateFileTag" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fileInfos": [
      {"fileId": "file_abc123", "tags": ["product", "V2"]},
      {"fileId": "file_def456", "tags": ["FAQ"]}
    ],
    "updateMode": "OVERWRITE"
  }'
{
  "code": "Success",
  "status_code": 200,
  "data": {},
  "requestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
The two updateMode values: OVERWRITE replaces a file's existing tags entirely; APPEND adds to the existing tags.

Authorizations

string
header
required

DashScope API Key, obtained from the API Key page in the console.

Body

application/json
object[]
required

File tag information list.

items: 1–20
enum<string>

Update mode — OVERWRITE (replace existing tags), APPEND (add to existing tags), REMOVE (delete the listed tags).

OVERWRITE,APPEND

Response

200-application/json
string

Response code. Success on success.

string

Error or informational message; an empty string on success.

string

Unique request identifier. Include this ID when reporting an issue.

object

Per-file update results.

integer

Business status code. 200 on success, 400 for failures such as invalid parameters. Note that the HTTP status code remains 200 even on failure, so rely on this field and code to determine the result.