/sys/namespaces
The /sys/namespaces
endpoint is used manage namespaces in Vault.
List namespaces
This endpoints lists all the namespaces.
Method | Path |
---|---|
LIST | /sys/namespaces |
Sample request
Sample response
Create namespace
This endpoint creates a namespace at the given path.
Method | Path |
---|---|
POST | /sys/namespaces/:path |
Parameters
path
(string: <required>)
– Specifies the path where the namespace will be created.custom_metadata
(map<string|string>: nil)
-Â A map of arbitrary string to string valued user-provided metadata meant to describe the namespace.
Sample payload
Sample request
Patch namespace
This endpoint patches an existing namespace at the specified path.
Method | Path |
---|---|
PATCH | /sys/namespaces/:path |
Parameters
path
(string: <required>)
– Specifies the path of the existing namespace.custom_metadata
(map<string|string>: nil)
-Â A map of arbitrary string to string valued user-provided metadata meant to describe the namespace.
Sample payload
Sample request
Delete namespace
This endpoint deletes a namespace at the specified path.
Method | Path |
---|---|
DELETE | /sys/namespaces/:path |
Sample request
Read namespace information
This endpoint gets the metadata for the given namespace path.
Method | Path |
---|---|
GET | /sys/namespaces/:path |
Sample request
Sample response
Lock namespace
This endpoint locks the API for the current namespace path or optional subpath. The behavior when interacting with Vault from a locked namespace is described in API Locked Response.
Method | Path |
---|---|
POST | /sys/namespaces/api-lock/lock/:subpath |
Sample request - current namespace
Sample response - current namespace
Sample request - X-Vault-Namespace
Sample response - X-Vault-Namespace
Sample request - descendant of current namespace
Sample response - descendant of current namespace
Unlock namespace
This endpoint unlocks the api for the current namespace path or optional subpath.
Method | Path |
---|---|
POST | /sys/namespaces/api-lock/unlock/:subpath |
Sample payload - current namespace Non-Root
Sample request - current namespace Non-Root
Sample request - current namespace root
Sample payload - descendant namespace Non-Root
Sample request - descendant namespace Non-Root