v2-versions

Download Spec

post /vault/api/v1/secret/delete/{path}

This endpoint issues a soft delete of the specified versions of the secret. This marks the versions as deleted and will stop them from being returned from reads, but the underlying data will not be removed. A delete can be undone using the undelete path.

path

string

required

Secret name

Response

ExamplesSchema

Versions marked soft deleted

Empty response

post /vault/api/v1/secret/undelete/{path}

Undeletes the data for the provided versions and path. This restores the data, allowing it to be returned on get requests.

path

string

required

Secret name

Response

ExamplesSchema

Versions made available again

Empty response

post /vault/api/v1/secret/destroy/{path}

Permanently removes the specified version data for the provided key and version numbers from the vault.

path

string

required

Secret name

Response

ExamplesSchema

Versions destroyed

Empty response

get /vault/api/v1/secret/data/{path}

This endpoint retrieves the secret at the specified location

version

int

Specifies the version to return. If not set the latest version is returned

Response

ExamplesSchema

Version data

{
  "data": {},
  "metadata": {
    "version": 123,
    "created": "string",
    "deletion_time": "string",
    "destroyed": true
  }
}

post /vault/api/v1/secret/data/{path}

This endpoint creates a new version of a secret at the specified location

data

object (data)

Request

{
  "data": {}
}

Response

ExamplesSchema

New version added

{
  "version": 123,
  "created": "string",
  "deletion_time": "string",
  "destroyed": true
}

delete /vault/api/v1/secret/data/{path}

This endpoint issues a soft delete of the secret's latest version at the specified location. This marks the version as deleted and will stop it from being returned from reads, but the underlying data will not be removed. A delete can be undone using the undelete path.

path

string

required

Secret name

Response

ExamplesSchema

Latest version soft deleted

Empty response

Was this page helpful?