Vault
Use HashiCorp Vault and OpenBao: KV secrets with versions, transit encryption, signatures and HMAC, token, AppRole or Kubernetes login. Typical uses: read a password at run time, encrypt data without holding the key.
vault pingvault infovault kv_putvault kv_putvault kv_getvault kv_getvault kv_patchvault kv_patchvault kv_listvault kv_listvault kv_metadatavault kv_metadatavault kv_deletevault kv_deletevault kv_undeletevault kv_undeletevault kv_destroyvault kv_destroyvault encryptvault encryptvault decryptvault decryptvault signvault signvault hmacvault hmacvault verifyvault verifyvault randvault randvault requestvault request

vault ping <config>


Description

    Check the server without authentication (sys/health): {ok (initialized and unsealed), version, initialized, sealed, standby, cluster_name}

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
admin
vault ping "{\"url\": \"http://127.0.0.1:8200\"}"
mentdb
{"ok": true, "version": "2.2.2", "initialized": true, "sealed": false, "standby": false, "cluster_name": "vault-cluster-50bae5c1"}

vault info <config>


Description

    Health, seal status, and the token used (display name, policies, ttl; never the token itself nor its accessor)

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
admin
vault info "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}"
mentdb
{"health": {"initialized": true, "sealed": false, "standby": false, "performance_standby": false, "replication_performance_mode": "disabled", "replication_dr_mode": "disabled", "server_time_utc": 1794932616, "version": "2.2.2", "enterprise": false, "cluster_name": "vault-cluster-50bae5c1", "cluster_id": "90eafd3b-6ba7-5920-806b-506baa5b6cc1", "echo_duration_ms": 0, "clock_skew_ms": 0, "replication_primary_canary_age_ms": 0}, "seal": {"type": "shamir", "sealed": false, "t": 1, "n": 1, "progress": 0, "version": "2.2.2", "build_date": "2026-11-11T13:53:02Z", "storage_type": "inmem", "migration": false, "recovery_seal": false}, "token": {"display_name": "token", "policies": ["root"], "type": "service", "ttl": 0, "renewable": false, "orphan": true, "expire_time": null, "entity_id": ""}}

vault kv_put <config> <path> <json_data>


Description

    Write a secret (a JSON object). KV 2: a new version {version, created_time}; KV 1: {written: true}

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    json_data:   The secret as a JSON object - String - required
admin
vault kv_put "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{\"user\": \"app\", \"password\": \"Pa55-word!\"}"
mentdb
{"version": 1, "created_time": "2026-11-17T16:23:36.764621Z"}

vault kv_put <config> <path> <json_data> <json_params>


Description

    Write with options: cas (check-and-set: the write succeeds only if the current version is this one; 0 = only if absent), mount, kv_version

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    json_data:   The secret as a JSON object - String - required
    json_params:   The options as a JSON object - String - required
admin
vault kv_put "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{\"user\": \"app\", \"password\": \"N3w-pass!\"}" "{\"cas\": 1}"
mentdb
{"version": 2, "created_time": "2026-11-17T16:23:37.51907Z"}
refused: the version is now 2 (fixed result: real HashiCorp Vault 2.2.2 dev server; OpenBao 2.7.2 gives the same results)
admin
vault kv_put "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{\"user\": \"app\", \"password\": \"other\"}" "{\"cas\": 1}"
mentdb
ERROR: Sorry, an error appears (vault error (kv write): check-and-set parameter did not match the current version (HTTP 400)).
on a KV version 1 mount (fixed result: real HashiCorp Vault 2.2.2 dev server; OpenBao 2.7.2 gives the same results)
admin
vault kv_put "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "smtp" "{\"password\": \"mail-pass\"}" "{\"mount\": \"kv1\", \"kv_version\": 1}"
mentdb
{"written": true}

vault kv_get <config> <path>


Description

    Read the latest version of a secret: the JSON object, or null when it does not exist or its version is deleted

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
admin
vault kv_get "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db"
mentdb
{"password": "N3w-pass!", "user": "app"}
missing (fixed result: real HashiCorp Vault 2.2.2 dev server; OpenBao 2.7.2 gives the same results)
admin
vault kv_get "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/nothing"
mentdb
null

vault kv_get <config> <path> <json_params>


Description

    Read with options: field (one field as text), version (KV 2), mount, kv_version

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    json_params:   The options as a JSON object - String - required
admin
vault kv_get "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{\"field\": \"password\"}"
mentdb
N3w-pass!
an older version (fixed result: real HashiCorp Vault 2.2.2 dev server; OpenBao 2.7.2 gives the same results)
admin
vault kv_get "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{\"version\": 1, \"field\": \"password\"}"
mentdb
Pa55-word!
a KV version 1 mount (fixed result: real HashiCorp Vault 2.2.2 dev server; OpenBao 2.7.2 gives the same results)
admin
vault kv_get "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "smtp" "{\"mount\": \"kv1\", \"kv_version\": 1}"
mentdb
{"password": "mail-pass"}
with AppRole over https (private CA) (fixed result: real HashiCorp Vault 2.2.2 dev server; OpenBao 2.7.2 gives the same results)
admin
vault kv_get "{\"url\": \"https://vault.example.com:8200\", \"role_id\": \"fd9d5ac5-fec8-b26f-ab57-3e361ac079de\", \"secret_id\": \"vault_secret_id\", \"ca_file\": \"conf/vault-ca.pem\"}" "app/db" "{\"field\": \"user\"}"
mentdb
app

vault kv_patch <config> <path> <json_data>


Description

    Merge fields into the latest version (KV 2 only, JSON merge patch: a null field is removed). Returns the new version; an error if the secret does not exist

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    json_data:   The fields to change - String - required
admin
vault kv_patch "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{\"port\": 5432}"
mentdb
{"version": 3, "created_time": "2026-11-17T16:23:44.40222Z"}

vault kv_patch <config> <path> <json_data> <json_params>


Description

    Patch with options: cas, mount

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    json_data:   The fields to change - String - required
    json_params:   The options as a JSON object - String - required
admin
vault kv_patch "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{\"host\": \"db1\"}" "{\"cas\": 3}"
mentdb
{"version": 4, "created_time": "2026-11-17T16:23:45.18647Z"}

vault kv_list <config> <path>


Description

    The names under a folder (a name ending with / is a folder); [] when the folder does not exist

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The folder, "" for the root of the mount - String - required
admin
vault kv_list "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" ""
mentdb
["app/", "billing/"]
a folder (fixed result: real HashiCorp Vault 2.2.2 dev server; OpenBao 2.7.2 gives the same results)
admin
vault kv_list "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app"
mentdb
["db"]

vault kv_list <config> <path> <json_params>


Description

    List with options: mount, kv_version

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The folder - String - required
    json_params:   The options as a JSON object - String - required
admin
vault kv_list "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "" "{\"mount\": \"kv1\", \"kv_version\": 1}"
mentdb
["smtp"]

vault kv_metadata <config> <path>


Description

    The metadata of a secret (KV 2): current_version, oldest_version, max_versions, cas_required, times, custom_metadata, and versions as rows {version, created_time, deletion_time, destroyed}; null when it does not exist

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
admin
vault kv_metadata "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db"
mentdb
{"cas_required": false, "created_time": "2026-11-17T16:23:36.764621Z", "current_version": 4, "custom_metadata": null, "delete_version_after": "0s", "last_updated_by": {"actor": "token", "operation": "patch", "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8="}, "max_versions": 0, "oldest_version": 0, "updated_time": "2026-11-17T16:23:45.18647Z", "versions": [{"version": 1, "created_by": {"actor": "token", "operation": "create", "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8="}, "created_time": "2026-11-17T16:23:36.764621Z", "deleted_by": null, "deletion_time": "", "destroyed": false}, {"version": 2, "created_by": {"actor": "token", "operation": "update", "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8="}, "created_time": "2026-11-17T16:23:37.51907Z", "deleted_by": null, "deletion_time": "", "destroyed": false}, {"version": 3, "created_by": {"actor": "token", "operation": "patch", "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8="}, "created_time": "2026-11-17T16:23:44.40222Z", "deleted_by": null, "deletion_time": "", "destroyed": false}, {"version": 4, "created_by": {"actor": "token", "operation": "patch", "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8="}, "created_time": "2026-11-17T16:23:45.18647Z", "deleted_by": null, "deletion_time": "", "destroyed": false}]}

vault kv_metadata <config> <path> <json_params>


Description

    Metadata with options: mount

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    json_params:   The options as a JSON object - String - required
admin
vault kv_metadata "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{}"
mentdb
{"cas_required": false, "created_time": "2026-11-17T16:23:36.764621Z", "current_version": 4, "custom_metadata": null, "delete_version_after": "0s", "last_updated_by": {"actor": "token", "operation": "patch", "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8="}, "max_versions": 0, "oldest_version": 0, "updated_time": "2026-11-17T16:23:45.18647Z", "versions": [{"version": 1, "created_by": {"actor": "token", "operation": "create", "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8="}, "created_time": "2026-11-17T16:23:36.764621Z", "deleted_by": null, "deletion_time": "", "destroyed": false}, {"version": 2, "created_by": {"actor": "token", "operation": "update", "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8="}, "created_time": "2026-11-17T16:23:37.51907Z", "deleted_by": null, "deletion_time": "", "destroyed": false}, {"version": 3, "created_by": {"actor": "token", "operation": "patch", "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8="}, "created_time": "2026-11-17T16:23:44.40222Z", "deleted_by": null, "deletion_time": "", "destroyed": false}, {"version": 4, "created_by": {"actor": "token", "operation": "patch", "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8="}, "created_time": "2026-11-17T16:23:45.18647Z", "deleted_by": null, "deletion_time": "", "destroyed": false}]}

vault kv_delete <config> <path>


Description

    Delete a secret: KV 2 soft-deletes the latest version (vault kv_undelete brings it back), KV 1 deletes it. Returns {deleted: true}

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
admin
vault kv_delete "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db"
mentdb
{"deleted": true}
now missing (fixed result: real HashiCorp Vault 2.2.2 dev server; OpenBao 2.7.2 gives the same results)
admin
vault kv_get "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{\"field\": \"user\"}"
mentdb
null

vault kv_delete <config> <path> <json_params>


Description

    Delete with options: versions (KV 2: soft-delete these versions), mount, kv_version

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    json_params:   The options as a JSON object - String - required
admin
vault kv_delete "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{\"versions\": [1]}"
mentdb
{"deleted": true}

vault kv_undelete <config> <path> <versions>


Description

    Restore soft-deleted versions (KV 2). Returns {undeleted: [...]}

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    versions:   A version number or a JSON array of version numbers - String - required
admin
vault kv_undelete "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" 4
mentdb
{"undeleted": [4]}
readable again (fixed result: real HashiCorp Vault 2.2.2 dev server; OpenBao 2.7.2 gives the same results)
admin
vault kv_get "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "{\"field\": \"host\"}"
mentdb
db1

vault kv_undelete <config> <path> <versions> <json_params>


Description

    Undelete with options: mount

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    versions:   The versions - String - required
    json_params:   The options as a JSON object - String - required
admin
vault kv_undelete "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" 4 "{}"
mentdb
{"undeleted": [4]}

vault kv_destroy <config> <path> <versions>


Description

    Destroy versions for good (KV 2): their data cannot be recovered. Returns {destroyed: [...]}

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    versions:   A version number or a JSON array of version numbers - String - required
admin
vault kv_destroy "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "[1, 2]"
mentdb
{"destroyed": [1, 2]}

vault kv_destroy <config> <path> <versions> <json_params>


Description

    Destroy with options: mount

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    path:   The path of the secret under the KV mount, like app/db (no mount, no data/ part) - String - required
    versions:   The versions - String - required
    json_params:   The options as a JSON object - String - required
admin
vault kv_destroy "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app/db" "[1, 2]" "{}"
mentdb
{"destroyed": [1, 2]}

vault encrypt <config> <key> <plaintext>


Description

    Encrypt a text with a transit key (the key never leaves Vault). Returns the ciphertext vault:v:...

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    key:   The name of the transit key - String - required
    plaintext:   The text (UTF-8) - String - required
admin
vault encrypt "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app" "FR76 3000 6000 0112 3456 7890 189"
mentdb
vault:v1:KSUMXSN+SnKui9tS8O3CyG0srsrsJDJp7+fRnlbe0jXsmi2cwsOlwjf4guadRh9rY9fqarbkMDMguDPbTw==

vault encrypt <config> <key> <plaintext> <json_params>


Description

    Encrypt with options: base64 (the plaintext is already base64: binary data), context (derived keys), key_version, mount

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    key:   The name of the transit key - String - required
    plaintext:   The text - String - required
    json_params:   The options as a JSON object - String - required
admin
vault encrypt "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app" "aGVsbG8=" "{\"base64\": true}"
mentdb
vault:v1:vWwV58YvwfKoB41YQVninqpoq0vRDtSXA9fzwAgWik8D

vault decrypt <config> <key> <ciphertext>


Description

    Decrypt a ciphertext of vault encrypt. Returns the UTF-8 text (an error if the data is not text: use the option base64)

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    key:   The name of the transit key - String - required
    ciphertext:   The ciphertext vault:v:... - String - required
admin
vault decrypt "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app" "vault:v1:KSUMXSN+SnKui9tS8O3CyG0srsrsJDJp7+fRnlbe0jXsmi2cwsOlwjf4guadRh9rY9fqarbkMDMguDPbTw=="
mentdb
FR76 3000 6000 0112 3456 7890 189

vault decrypt <config> <key> <ciphertext> <json_params>


Description

    Decrypt with options: base64 (return base64), context, mount

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    key:   The name of the transit key - String - required
    ciphertext:   The ciphertext - String - required
    json_params:   The options as a JSON object - String - required
admin
vault decrypt "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app" "vault:v1:KSUMXSN+SnKui9tS8O3CyG0srsrsJDJp7+fRnlbe0jXsmi2cwsOlwjf4guadRh9rY9fqarbkMDMguDPbTw==" "{}"
mentdb
FR76 3000 6000 0112 3456 7890 189

vault sign <config> <key> <input>


Description

    Sign a text with an asymmetric transit key (ecdsa, ed25519, rsa). Returns vault:v:

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    key:   The name of the transit key - String - required
    input:   The text to sign - String - required
admin
vault sign "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "signer" "invoice 2026-118, 1250.00 EUR"
mentdb
vault:v1:MEUCIQDescDVZpOvwVnGAtW2TbQJ6IkZEOyIZALyLnh29Q5SQAIgGSFEcmU2Tqbi9rxCZZcjj8PnBB5cN44s/WNU96NP2AU=

vault sign <config> <key> <input> <json_params>


Description

    Sign with options: hash_algorithm (sha2-256...), signature_algorithm (pss or pkcs1v15 for RSA), marshaling_algorithm (asn1 or jws), prehashed, base64, key_version, mount

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    key:   The name of the transit key - String - required
    input:   The text to sign - String - required
    json_params:   The options as a JSON object - String - required
admin
vault sign "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "signer" "hello" "{\"hash_algorithm\": \"sha2-512\", \"marshaling_algorithm\": \"jws\"}"
mentdb
vault:v1:vu0Qz20ztUblhR3AX9UfajVb74tYdgEiP-BxhLKrzpuu5-Pz4k3LHmQgjDobXqXPIycHFBoalIoFot6fX8AasQ

vault hmac <config> <key> <input>


Description

    HMAC of a text with a transit key. Returns vault:v:

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    key:   The name of the transit key - String - required
    input:   The text - String - required
admin
vault hmac "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app" "customer-000123"
mentdb
vault:v1:kQOngB058PiFGVKx5ajHnN1uddL/Slgh5QEe7joxepI=

vault hmac <config> <key> <input> <json_params>


Description

    HMAC with options: algorithm (sha2-256, sha2-512...), base64, key_version, mount

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    key:   The name of the transit key - String - required
    input:   The text - String - required
    json_params:   The options as a JSON object - String - required
admin
vault hmac "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app" "customer-000123" "{}"
mentdb
vault:v1:kQOngB058PiFGVKx5ajHnN1uddL/Slgh5QEe7joxepI=

vault verify <config> <key> <input> <signature>


Description

    Check a signature of vault sign: {valid: true} or {valid: false}

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    key:   The name of the transit key - String - required
    input:   The signed text - String - required
    signature:   The signature vault:v:... - String - required
admin
vault verify "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "signer" "invoice 2026-118, 1250.00 EUR" "vault:v1:MEUCIQDescDVZpOvwVnGAtW2TbQJ6IkZEOyIZALyLnh29Q5SQAIgGSFEcmU2Tqbi9rxCZZcjj8PnBB5cN44s/WNU96NP2AU="
mentdb
{"valid": true}
the text was changed (fixed result: real HashiCorp Vault 2.2.2 dev server; OpenBao 2.7.2 gives the same results)
admin
vault verify "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "signer" "invoice 2026-118, 9250.00 EUR" "vault:v1:MEUCIQDescDVZpOvwVnGAtW2TbQJ6IkZEOyIZALyLnh29Q5SQAIgGSFEcmU2Tqbi9rxCZZcjj8PnBB5cN44s/WNU96NP2AU="
mentdb
{"valid": false}

vault verify <config> <key> <input> <signature> <json_params>


Description

    Verify with options: hmac (true: check an HMAC of vault hmac instead of a signature) and the options of vault sign

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    key:   The name of the transit key - String - required
    input:   The text - String - required
    signature:   The signature or the HMAC - String - required
    json_params:   The options as a JSON object - String - required
admin
vault verify "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "app" "customer-000123" "vault:v1:kQOngB058PiFGVKx5ajHnN1uddL/Slgh5QEe7joxepI=" "{\"hmac\": true}"
mentdb
{"valid": true}

vault rand <config> <bytes>


Description

    Random bytes from Vault (sys/tools/random), 1 to 65536, in base64

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    bytes:   The number of bytes - Number - required
admin
vault rand "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" 32
mentdb
fEKfoxVC0/SwMeboDVsFX3BxvPRszIqRsBHXvTC54Fk=

vault rand <config> <bytes> <json_params>


Description

    Random bytes with options: format (base64 or hex), source (platform, seal or all)

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    bytes:   The number of bytes - Number - required
    json_params:   The options as a JSON object - String - required
admin
vault rand "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" 16 "{\"format\": \"hex\"}"
mentdb
786bd9e950f5cab77ef076bc8acad2a3

vault request <config> <method> <path>


Description

    Any call of the Vault HTTP API: the method (GET, POST, PUT, PATCH, DELETE or LIST) and the path from the base URL (/v1/...). Returns the raw JSON body (or {status} when empty); an HTTP error is an error with the Vault message

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    method:   The HTTP method - String - required
    path:   The path, like /v1/sys/mounts - String - required
admin
vault request "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "LIST" "/v1/sys/policies/acl"
mentdb
{"request_id":"959ed51d-f819-2f5a-520c-7f0f965cffb3","lease_id":"","renewable":false,"lease_duration":0,"data":{"keys":["app","default","default-ceiling","root"]},"wrap_info":null,"warnings":null,"auth":null,"mount_type":"system"}

vault request <config> <method> <path> <json_body>


Description

    A raw request with a JSON body

Parameters

    config:   The Vault configuration as JSON: url (http://127.0.0.1:8200; https for any other host, or allow_plain true), the authentication: token (the name of a secret: secret set), or AppRole with role_id (the name of a secret: secret set) and secret_id (approle_mount: approle), or Kubernetes with k8s_role (k8s_jwt_file: /var/run/secrets/kubernetes.io/serviceaccount/token, k8s_mount: kubernetes); namespace (Vault Enterprise and OpenBao), kv_mount (secret), kv_version (2), transit_mount (transit), ca_file (a private CA in PEM), timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    method:   The HTTP method - String - required
    path:   The path - String - required
    json_body:   The body as JSON - String - required
admin
vault request "{\"url\": \"http://127.0.0.1:8200\", \"token\": \"vault_token\"}" "POST" "/v1/transit/keys/reports" "{\"type\": \"aes256-gcm96\"}"
mentdb
{"request_id":"8db70956-5750-7c6d-809f-51ff860d6fcc","lease_id":"","renewable":false,"lease_duration":0,"data":{"allow_plaintext_backup":false,"auto_rotate_period":0,"deletion_allowed":false,"derived":false,"exportable":false,"imported_key":false,"key_usages":["aead-encryption"],"keys":{"1":1794932642},"latest_version":1,"latest_version_type":"aes256-gcm96","min_available_version":0,"min_decryption_version":1,"min_encryption_version":0,"name":"reports","supports_decryption":true,"supports_derivation":true,"supports_encryption":true,"supports_signing":false,"type":"aes256-gcm96"},"wrap_info":null,"warnings":null,"auth":null,"mount_type":"transit"}