Skip to main content

BatchUpdateFileTag

This operation updates document tags in a data connection in batches.

Debug

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.

RAM authorization

No authorization information is currently exposed for this API.

Request syntax

PUT /{WorkspaceId}/datacenter/batchupdatetag HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

WorkspaceId

string

Yes

The workspace ID. To get this ID, go to the Model Studio console home and click the workspace details icon in the upper-left corner.

llm-3shx2gu255oqxxxx

Request parameters

Parameter

Type

Required

Description

Example

FileInfos

array<object>

Yes

A list of documents to update.

object

Yes

FileId

string

Yes

The file ID in the data center. Open Collections and click Details for the target file dataset. Click the ID icon next to the file name, then click the copy icon to copy the file ID.

file_3d5319366e2c46309f4c11cfbeacd5fd_10045951

tags

array

Yes

  • The list of tags associated with the file. You can pass up to 100 tags, and the total length of all tags cannot exceed 700 characters.

string

No

The tag value. Each tag can be up to 32 characters long. Supported characters include characters in the Unicode letter category (including English letters, Chinese characters, and digits), underscores (_), and hyphens (-). Tags must not contain spaces.

TagA

UpdateMode

string

No

The update mode. Only APPEND (append) and OVERWRITE (overwrite) are supported.

OVERWRITE

Response elements

Element

Type

Description

Example

object

Schema of Response

Code

string

The error status code.

Success

Data

object

The business fields returned by the operation.

UpdateFileTagResultList

array<object>

The list of tag update results.

object

FileId

string

The file ID.

file_f40f2a32205d44b4a93b11617113da15_10045951

Success

boolean

Indicates whether the operation call is successful. Valid values:

  • true: The call succeeded.

  • false: The call failed.

true

ErrorCode

string

The error code returned. This parameter is returned only when Success is false.

NoPermission

ErrorMessage

string

The error description. This parameter is returned only when Success is false.

FileId not exists.

Message

string

The error message.

Required parameter(FileId) missing or invalid, please check the request parameters.

RequestId

string

The request ID.

17204B98-xxxx-4F9A-8464-2446A84821CA

Status

string

The status code returned by the operation.

200

Success

boolean

Indicates whether the operation call is successful. Valid values:

  • true: The call succeeded.

  • false: The call failed.

true

Examples

Success response JSON format
{
  "Code": "Success",
  "Data": {
    "UpdateFileTagResultList": [
      {
        "FileId": "file_f40f2a32205d44b4a93b11617113da15_10045951",
        "Success": true,
        "ErrorCode": "NoPermission",
        "ErrorMessage": "FileId not exists."
      }
    ]
  },
  "Message": "Required parameter(FileId) missing or invalid, please check the request parameters.",
  "RequestId": "17204B98-xxxx-4F9A-8464-2446A84821CA",
  "Status": "200",
  "Success": true
}

Error codes

Visit the Error Center to view more error codes.

Change history

For more information, see change details.