v2-metadata

Download Spec

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

This endpoint retrieves the metadata and versions for the secret at the specified path. Metadata is version-agnostic.

path

string

required

Secret name

Response

ExamplesSchema

return metdata + vsn metadatas

{
  "metadata": {
    "created": "string",
    "created_by": "string",
    "updated": "string",
    "updated_by": "string",
    "current_version": 123,
    "max_versions": 123,
    "delete_version_after": "string",
    "oldest_version": 123
  },
  "versions": [
    {
      "version": 123,
      "created": "string",
      "deletion_time": "string",
      "destroyed": true
    }
  ]
}

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

This endpoint creates or updates the metadata of a secret at the specified location. It does not create a new version.

created

string

creation time

created_by

string

creator

updated

string

updation time

updated_by

string

updater

current_version

int

latest usable version

max_versions

int

length of password history

delete_version_after

string

remove deleted versions after the duration

oldest_version

int

oldest version

Request

{
  "created": "string",
  "created_by": "string",
  "updated": "string",
  "updated_by": "string",
  "current_version": 123,
  "max_versions": 123,
  "delete_version_after": "string",
  "oldest_version": 123
}

Response

ExamplesSchema

Host secret deleted

{
  "created": "string",
  "created_by": "string",
  "updated": "string",
  "updated_by": "string",
  "current_version": 123,
  "max_versions": 123,
  "delete_version_after": "string",
  "oldest_version": 123
}

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

This endpoint permanently deletes the key metadata and all version data for the specified key. All version history will be removed.

path

string

required

Secret name

Response

ExamplesSchema

secret and versions deleted

Empty response

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

This endpoint returns a list of metadata and version key names at the specified location. Metadata are suffixed with /.

path

string

required

Secret name

Response

ExamplesSchema

List of keys

{
  "keys": [
    "string"
  ]
}

Was this page helpful?