DELETE Bucket inventory

Last updated: 2021-08-30 14:39:12

    Overview

    This API is used to delete an inventory job from a bucket with the specified job ID.
    For more information, please see Inventory Overview.

    Note:

    • To call this API, ensure that you have the necessary permission on the bucket inventory job.
    • The bucket owner has such permission by default. If you do not have the permission, you can request it from the bucket owner.
    API Explorer is recommended.
    Debug
    API Explorer makes it easy to make online API calls, verify signatures, generate SDK code, search for APIs, etc. You can also use it to query the content of each request as well as its response.

    Request

    Sample request

    DELETE /?inventory&id=inventory-configuration-id HTTP/1.1
    Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
    Date: GMT Date
    Authorization: Auth String
    
    Note:

    Request parameters

    To call DELETE Bucket inventory, specify the following parameter:

    Parameter Description Type Required
    Id ID of the inventory job. Default value: None
    Letters, digits, hyphens (-), underscores (_), and dots (.) are supported.
    String Yes

    Request headers

    This API only uses common request headers. For more information, please see Common Request Headers.

    Request body

    The request body of this request is empty.

    Response

    Response headers

    This API returns only common response headers. For more information, please see Common Response Headers.

    Response body

    The response body is empty.

    Error codes

    This API returns common error responses and error codes. For more information, please see Error Codes.

    Sample

    Request

    The following example deletes the inventory job list1 from the examplebucket-1250000000 bucket:

    DELETE /?inventory&id=list1 HTTP/1.1
    Date: Mon, 28 Aug 2018 02:53:38 GMT
    Authorization: q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1503901499;1503901859&q-key-time=1503901499;1503901859&q-header-list=host&q-url-param-list=inventory&q-signature=761f3f6449c6a11684464f4b09c6f292f0a4****
    Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.com
    

    Response

    After the request above is made, COS returns “204 No Content”, indicating that the inventory job list1 has been successfully deleted from the bucket.

    HTTP/1.1 204 No Content 
    Server: tencent-cos
    Date: Mon, 28 Aug 2018 02:53:40 GMT
    x-cos-id-2:0dfafa/DAPDIFdafdsfDdfSFFfdfKKJdafasiuKJK2
    x-cos-request-id: NTlhM2I3M2JfMjQ4OGY3MGFfMWE1NF84****