Skip to main content

Delete object

delete
/api/pvlt/1.0/data/collections/{collection}/objects/{id}

Deletes an object from a collection. This operation is irreversible.

The role performing this operation must have both of the following:

  • The CapDataWriter or the CapDataDeleter capability.
  • At least one allowing policy and no denying policies for the delete operation for each of the properties defined for the collection specified in the call.

See identity and access management for more information about how capabilities are used to control access to operations and policies are used to control access to data.

Request

Header parameters

  • X-Tenant-Id - array of strings

    List of tenant IDs to enforce on the request.

Path parameters

  • collection - string required*

    The name of a collection.

  • id - string required*

    The ID of the object.

Query parameters

  • options - array of strings

    Options for the operation. Options include:

    • archived – whether to delete only archived objects. If not specified, delete only active objects.
    Each string:
  • adhoc_reason - string

    An ad-hoc reason for accessing the Vault data. Required when reason is set to Other.

  • reason - string required*

    Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false.

  • reload_cache - boolean

    Reloads the cache before the action.

Possible responses

The request is successful.

Try the API

Authorization

Path parameters

Query parameters

Headers

Navigate to the docs of your local Vault installation to try the API directly from there.

Code examples

Example