DeleteFileMeta
Call the DeleteFileMeta operation to delete the metadata of a specific object in a Dataset. This operation is commonly used to clean up metadata that persists after an object has been deleted from OSS, especially in scenarios where IndexOptions.IgnoreObjectDelete=True is set.
Usage notes
By default, an Alibaba Cloud account has the permission to delete file metadata. If you use a RAM user to perform this operation, ensure that the RAM user is granted the
oss:MetaQuerypermission.Before calling this operation, you must enable metadata management for the bucket by calling the OpenMetaQuery operation.
This operation affects only the metadata index and does not delete the object itself from OSS.
The uri parameter must be a valid OSS URI in the format
oss://{bucket}/{object-key}. The{bucket}in the URI must match the bucket specified in the request.The deletion is asynchronous. A 200 OK response indicates that the request has been accepted. The actual cleanup is completed within a few seconds.
Because the operation is idempotent, it returns an HTTP 200 status code even for a URI that is not indexed or has already been cleaned up.
Request syntax
POST /?metaQuery&action=deleteFileMeta&datasetName=DatasetName&uri=URI 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 that contains the file metadata. |
uri | string | Yes | oss://examplebucket/photos/sunset.jpg | The URI of the OSS object, in the format |
Response headers
This operation uses only common response headers. For more information, see Common Response Headers.
Response elements
This operation returns no response elements.
Examples
Request example
POST /?metaQuery&action=deleteFileMeta&datasetName=photos-2026&uri=oss%3A%2F%2Fexamplebucket%2Fphotos%2Fsunset.jpg 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: 64C8B6F4E7C5A3A8B9D6E7F5
Date: Wed, 20 May 2026 10:00:01 GMT
Content-Length: 0
Connection: keep-alive
Server: AliyunOSS