Updates the configuration of a specified dataset, such as its description and datasetConfig.
Usage notes
By default, an Alibaba Cloud account can update a dataset. To perform this operation as a RAM user, you must have the
oss:MetaQuerypermission.Before calling this operation, you must enable metadata management for the bucket by calling OpenMetaQuery, and the specified dataset must exist.
Updates apply only to objects indexed after the call. Existing indexed objects are not backfilled or recalculated. To recalculate historical data, first call DeleteFileMeta to clear the metadata of the corresponding files, and then write the files again to trigger indexing.
The operation updates only the parameters that you explicitly pass. Unspecified fields retain their original values.
You must pass at least one of the following parameters:
description,workflowParameters, ordatasetConfig. Otherwise, the operation returns anInvalidArgumenterror.The request body is empty. You must pass all updatable fields as URL query parameters.
WorkflowParametersis a legacy parameter for enabling basic workflows and is not used by new AI content awareness features. We recommend usingdatasetConfigfor all new integrations.
Request syntax
POST /?metaQuery&action=updateDataset&datasetName=DatasetName HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValueRequest headers
This operation uses only common request headers. For more information, see Common request headers.
Request parameters
Parameter | Type | Required | Example | Description |
datasetName | string | Yes | videos-en | The name of the dataset to update. |
description | string | No | New description | A new description for the dataset. The value must be URL-encoded if it contains non-ASCII characters. The description can be up to 256 characters in length. |
workflowParameters | Array of WorkflowParameter | No | [{"Name":"ImageInsightEnable","Value":"False"}] | A legacy parameter for basic AI content awareness settings. When passed as a URL query parameter, the value must be JSON serialized and then URL-encoded. This parameter is not used by future features. We recommend using Child node: WorkflowParameter |
WorkflowParameter | container | No | N/A | A container for the configuration of a single workflow parameter. Child nodes: Name, Value Parent node: workflowParameters |
Name | string | Yes | ImageInsightEnable | The name of the workflow parameter. Valid values: VideoInsightEnable, ImageInsightEnable, and UserDefinedLabelsEnable. Parent node: WorkflowParameter |
Value | string | Yes | False | The value for the workflow parameter. Valid values are True or False. Parent node: WorkflowParameter |
datasetConfig | DatasetConfig object | No | {"Insights":{"Language":"pt"}} | Overwrites the existing dataset-level configuration. When passed as a URL query parameter, the value must be JSON serialized and then URL-encoded. For the field structure, see the DatasetConfig data structure. Child nodes: Insights, ReverseImage, SmartCluster |
Response headers
This operation uses only common response headers. For more information, see Common response headers.
Response elements
Parameter | Type | Required | Example | Description |
UpdateDatasetResponse | container | Yes | N/A | A container for the response data. Child node: Dataset |
Dataset | container | Yes | N/A | Contains the full configuration of the updated dataset. For details, see the Dataset data structure. Parent node: UpdateDatasetResponse |
Examples
Request example
The following example shows how to change the Insights language of the videos-en dataset from en to pt:
POST /?metaQuery&action=updateDataset&datasetName=videos-en&datasetConfig=%7B%22Insights%22%3A%7B%22Language%22%3A%22pt%22%7D%7D HTTP/1.1
Host: examplebucket.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 20 May 2026 09:00:00 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20260520/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218eThe following is an example of an update using the legacy workflowParameters parameter. This method applies only to existing basic settings, as future features do not use workflowParameters.
POST /?metaQuery&action=updateDataset&datasetName=videos-basic&workflowParameters=%5B%7B%22Name%22%3A%22VideoInsightEnable%22%2C%22Value%22%3A%22False%22%7D%5D HTTP/1.1
Host: examplebucket.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 20 May 2026 09:00:00 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20260520/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218eThe URL-decoded value of the workflowParameters parameter is as follows:
[
{"Name": "VideoInsightEnable", "Value": "False"}
]Response example
HTTP/1.1 200 OK
x-oss-request-id: 64C8B6F4E7C5A3A8B9D6E7F3
Date: Wed, 20 May 2026 09:00:01 GMT
Content-Type: application/xml
Server: AliyunOSS
<?xml version="1.0" encoding="UTF-8"?>
<UpdateDatasetResponse>
<Dataset>
<DatasetName>videos-en</DatasetName>
<Description>New description</Description>
<CreateTime>2026-05-20T08:00:00.000+08:00</CreateTime>
<UpdateTime>2026-05-20T09:00:00.000+08:00</UpdateTime>
<DatasetMaxFileCount>100000000</DatasetMaxFileCount>
<DatasetMaxEntityCount>10000000000</DatasetMaxEntityCount>
<DatasetMaxRelationCount>100000000000</DatasetMaxRelationCount>
<DatasetMaxTotalFileSize>90000000000000000</DatasetMaxTotalFileSize>
<DatasetConfig>
<Insights>
<Language>pt</Language>
</Insights>
</DatasetConfig>
</Dataset>
</UpdateDatasetResponse>