Deletes a specified Dataset. This operation removes only the Dataset, not the actual objects in OSS.
Usage notes
By default, an Alibaba Cloud account can delete a Dataset. A RAM user must have the
oss:MetaQuerypermission to perform this operation.This operation is irreversible. After a Dataset is deleted, subsequent calls to the GetDataset operation return a
DatasetNotExisterror.You cannot delete a non-empty Dataset. If a Dataset still contains indexed file metadata, the operation returns a
StatusConflicterror (HTTP status code 409). Before you can delete the Dataset, you must first clear its file metadata with the DeleteFileMeta operation.To disable metadata management for an entire bucket, call the CloseMetaQuery operation. This eliminates the need to delete each Dataset individually.
This operation does not require a request body and returns an empty response body.
Request syntax
POST /?metaQuery&action=deleteDataset&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 | photos-2026 | The name of the Dataset to delete. |
Response headers
This operation uses only common response headers. For more information, see Common Response Headers.
Response elements
This operation has no response elements.
Examples
Request example
POST /?metaQuery&action=deleteDataset&datasetName=photos-2026 HTTP/1.1
Host: examplebucket.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 20 May 2026 10:00:00 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20260520/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218eResponse example
HTTP/1.1 200 OK
x-oss-request-id: 64C8B6F4E7C5A3A8B9D6E7F4
Date: Wed, 20 May 2026 10:00:01 GMT
Content-Length: 0
Connection: keep-alive
Server: AliyunOSS