.. _delete_object: Method: Delete Object --------------------- Description ~~~~~~~~~~~ Delete an Object in an existing Vault. A user can delete (create, or update) objects in a Vault, if the following conditions are met: * The user has been assigned Write permission in the Vault by the Data Custodian (a user with the Admin capability) of the Vault. URL Syntax ~~~~~~~~~~ /api/{version}/object/:object-id HTTP Method ~~~~~~~~~~~ DELETE Successful HTTP Response ~~~~~~~~~~~~~~~~~~~~~~~~ 200 Parameters ~~~~~~~~~~ +----------------+------------------+----------------+---------+-----------+------------------+ | Parameter name | Description | Parameter type | Type | Mandatory | Comment | +================+==================+================+=========+===========+==================+ | X-Http-Token | StoredSafe token | HTTP Header | String | :sup:`1)` | Preferred method | +----------------+------------------+----------------+---------+-----------+------------------+ | token | StoredSafe token | JSON-encoded | String | :sup:`1)` | Legacy method | +----------------+------------------+----------------+---------+-----------+------------------+ | object-id | Object-ID | URL-parameter | Integer | Yes | | +----------------+------------------+----------------+---------+-----------+------------------+ Response Attributes ~~~~~~~~~~~~~~~~~~~ +---------------------+-------------------------------------------------+---------+ | Attribute | Description | Type | +=====================+=================================================+=========+ | CALLINFO.errorcodes | Number of errors | Integer | +---------------------+-------------------------------------------------+---------+ | CALLINFO.errors | Number of errors | Integer | +---------------------+-------------------------------------------------+---------+ | CALLINFO.general | Information | Array | +---------------------+-------------------------------------------------+---------+ | CALLINFO.handler | Handler used | String | +---------------------+-------------------------------------------------+---------+ | CALLINFO.status | SUCCESS or FAIL | String | +---------------------+-------------------------------------------------+---------+ | CALLINFO.message | Any message from handler (if successful) | String | +---------------------+-------------------------------------------------+---------+ | CALLINFO.token | StoredSafe token to be used in subsequent calls | String | +---------------------+-------------------------------------------------+---------+ | HEADERS | HTTP Headers | Object | +---------------------+-------------------------------------------------+---------+ | DATA | Supplied data in API-call | Object | +---------------------+-------------------------------------------------+---------+ | PARAMS | PARAMS (empty) | Array | +---------------------+-------------------------------------------------+---------+ Examples ~~~~~~~~ Delete object 491. **Request** :: DELETE /api/1.0/object/491 x-http-token: your_storedsafe_token **Response** :: HTTP/2 200 Content-type: application/json; charset=UTF-8 { "CALLINFO": { "message": "DELETED", "errorcodes": 0, "errors": 0, "general": [], "handler": "ObjectHandler", "status": "SUCCESS", "token": "rotated_storedsafe_token" }, "DATA": { "token": "your_storedsafe_token" }, "HEADERS": { "Accept": "*/*", "Host": "safe.domain.cc", "User-Agent": "curl/7.64.1", "X-Http-Token": "your_storedsafe_token" }, "PARAMS": [] }