Method: Delete a Vault

Description

Deletes a Vault.

A user with the correct capabilities, Write in this case, can delete a Vault, if the following conditions are met:

  1. The user is a Data Custodian (Admin permission) of the Vault
  2. The Vault is empty

URL Syntax

/api/{version}/vault/:vault-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 1) Preferred method
token StoredSafe token JSON-encoded String 1) Legacy method
vault-id Vault-id of the Vault URL-paramater Integer Yes  

Note

1) One of the methods is required.

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 Message from handler (if successful) String
CALLINFO.token StoredSafe token to be used in subsequent calls String
DATA Supplied data in API-call Object
PARAMS PARAMS (empty) Object
ERRORCODES Error code and text (Only present if errors) Object
ERRORS Error code and text (Only present if errors) Array

Examples

Delete an empty Vault.

Request

DELETE /api/1.0/vault/178
x-http-token: your_storedsafe_token

Response

HTTP/1.1 200 OK
Content-Length: 212
Content-Type: application/json
{
  "DATA": {
    "token": "rotated_storedsafe_token"
  },
  "PARAMS": [
  ],
  "CALLINFO": {
    "token": "your_storedsafe_token",
    "message": "Vault deleted",
    "handler": "GroupHandler",
    "status": "SUCCESS"
  }
}