DeleteObject
Updated at:2025-11-03
API description
This command allows you to delete an object in a specified bucket, requiring the requester to have write permission for the object.
Request
-
Request syntax
Plain Text1DELETE /<ObjectName> HTTP/1.1 2Host: <BucketName>.bj.bcebos.com 3Date: <Date> 4Authorization: <AuthorizationString> -
Multi-version request syntax
Plain Text1DELETE /<ObjectName>?versionId=<VersionId> HTTP/1.1 2Host: <BucketName>.bj.bcebos.com 3Date: <Date> 4Authorization: <AuthorizationString> -
Request headers
No special header parameters
-
Request parameters
| Field | Types | Whether required | Description |
|---|---|---|---|
| versionId | String | No | Retrieve the version ID of an object. If it is null by default, the latest version will be retrieved; if specified as "null," the null version's information will be retrieved. |
Response
Note
None
Example
-
Request example
Plain Text1DELETE /ObjectName HTTP/1.1 2Host: BucketName.bj.bcebos.com 3Date: Wed, 06 Apr 2016 06:34:40 GMT 4Authorization: AuthorizationString -
Response example
Plain Text1HTTP/1.1 204 No Content 2x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409 3Date: Wed, 06 Apr 2016 06:34:40 GMT 4Content-Length: 0 5Connection: close 6Server: BceBos -
Multi-version request example
Plain Text1DELETE /ObjectName?versionId=ADCQMlGFiNo%3D HTTP/1.1 2Host: BucketName.bj.bcebos.com 3Date: Wed, 06 Apr 2016 06:34:40 GMT 4Authorization: AuthorizationString -
Response example
Plain Text1HTTP/1.1 204 No Content 2x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409 3Date: Wed, 06 Apr 2016 06:34:40 GMT 4Content-Length: 0 5Connection: close 6Server: BceBos
