Use the CloseMetaQuery API to disable metadata management for a bucket. The system then asynchronously deletes the bucket's metadata index, making all related features unavailable.
Usage notes
By default, an Alibaba Cloud account can disable metadata management. A RAM user must have the
oss:MetaQuerypermission to do so.This is an asynchronous operation. A 200 OK response indicates that the service accepted the request, but the server performs the cleanup in the background. This process typically takes several minutes.
This API is idempotent. Calling this API for a bucket where metadata management is not enabled, has been disabled, or is being cleaned up returns a 200 OK response and does not report an error.
Disabling this feature also deletes all Datasets and their indexed metadata within the bucket. This includes Datasets automatically created when
RouteRule.AutoCreateDataset=True. This operation is irreversible. Proceed with caution.To re-enable the feature, you must wait for the background data cleanup to complete. This process typically takes several minutes. If you call the OpenMetaQuery API before the cleanup is complete, the API may return a
MetaQueryNotReadyerror.
Request syntax
POST /?metaQuery&action=closeMetaQuery 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 body
This operation does not have a request body.
Response headers
This operation uses only common response headers. For more information, see Common response headers.
Response body
This operation does not have a response body.
Examples
Request example
POST /?metaQuery&action=closeMetaQuery HTTP/1.1
Host: oss-example.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: 64C8B6F4E7C5A3A8B9D6E7F2
Date: Wed, 20 May 2026 10:00:01 GMT
Content-Length: 0
Connection: keep-alive
Server: AliyunOSS