Skip to main content
DELETE
/
v1
/
storage
/
objects
Delete multiple objects from Storage
curl --request DELETE \
  --url https://api.example.com/v1/storage/objects \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "object_keys": [
    "my-file.pdf",
    "my-file.doc"
  ],
  "path": [
    "pdf/",
    "doc/"
  ]
}
'
{
  "code": 200,
  "data": {
    "deleted_object_count": 3,
    "deleted_objects": [
      "my-file.pdf",
      "my-file.doc",
      "doc/my-file-2.doc"
    ],
    "errors": [
      {
        "error_code": "404",
        "error_message": "Objects not exist in path",
        "key": "pdf/"
      }
    ]
  },
  "exception": null,
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Include the token in the Authorization header as 'Bearer '

Body

application/json

The objects to delete from storage.

object_keys
string[]
required

List of object keys to delete. e.g. ["pdf/test.pdf", "pdf/test2.pdf"]

path
string[]
required

Path of the objects to delete. e.g. "pdf/"

Response

Success to delete objects from storage.

code
integer<int32>
required

HTTP status code.

Required range: x >= 0
success
boolean
required

Whether the request was successful.

data
object
exception
object