»/sys/raw

The /sys/raw endpoint is used to access the raw underlying store in Vault.

This endpoint is off by default. See the Vault configuration documentation to enable.

»Read Raw

This endpoint reads the value of the key at the given path. This is the raw path in the storage backend and not the logical path that is exposed via the mount system.

MethodPath
GET/sys/raw/:path

»Parameters

  • path (string: <required>) – Specifies the raw path in the storage backend. This is specified as part of the URL.

»Sample Request

$ curl \
    --header "X-Vault-Token: ..." \
    http://127.0.0.1:8200/v1/sys/raw/secret/foo
$ curl \    --header "X-Vault-Token: ..." \    http://127.0.0.1:8200/v1/sys/raw/secret/foo

»Sample Response

{
  "value": "{'foo':'bar'}"
}
{  "value": "{'foo':'bar'}"}

»Create/Update Raw

This endpoint updates the value of the key at the given path. This is the raw path in the storage backend and not the logical path that is exposed via the mount system.

MethodPath
PUT/sys/raw/:path

»Parameters

  • path (string: <required>) – Specifies the raw path in the storage backend. This is specified as part of the URL.

  • value (string: <required>) – Specifies the value of the key.

»Sample Payload

{
  "value": "{\"foo\": \"bar\"}"
}
{  "value": "{\"foo\": \"bar\"}"}

»Sample Request

$ curl \
    --header "X-Vault-Token: ..." \
    --request PUT \
    --data @payload.json \
    http://127.0.0.1:8200/v1/sys/raw/secret/foo
$ curl \    --header "X-Vault-Token: ..." \    --request PUT \    --data @payload.json \    http://127.0.0.1:8200/v1/sys/raw/secret/foo

»List Raw

This endpoint returns a list keys for a given path prefix.

This endpoint requires 'sudo' capability.

MethodPath
LIST/sys/raw/:prefix
GET/sys/raw/:prefix?list=true

»Sample Request

$ curl \
    --header "X-Vault-Token: ..." \
    --request LIST \
    http://127.0.0.1:8200/v1/sys/raw/logical
$ curl \    --header "X-Vault-Token: ..." \    --request LIST \    http://127.0.0.1:8200/v1/sys/raw/logical

»Sample Response

{
  "data": {
    "keys": ["abcd-1234...", "efgh-1234...", "ijkl-1234..."]
  }
}
{  "data": {    "keys": ["abcd-1234...", "efgh-1234...", "ijkl-1234..."]  }}

»Delete Raw

This endpoint deletes the key with given path. This is the raw path in the storage backend and not the logical path that is exposed via the mount system.

MethodPath
DELETE/sys/raw/:path

»Parameters

  • path (string: <required>) – Specifies the raw path in the storage backend. This is specified as part of the URL.

»Sample Request

$ curl \
    --header "X-Vault-Token: ..." \
    --request DELETE \
    http://127.0.0.1:8200/v1/sys/raw/secret/foo
$ curl \    --header "X-Vault-Token: ..." \    --request DELETE \    http://127.0.0.1:8200/v1/sys/raw/secret/foo