vault/website/content/api-docs/system/internal-ui-namespaces.mdx
Erica Thompson 0660ea6fac
Update README (#31244)
* Update README

Let contributors know that docs will now be located in UDR

* Add comments to each mdx doc

Comment has been added to all mdx docs that are not partials

* chore: added changelog

changelog check failure

* wip: removed changelog

* Fix content errors

* Doc spacing

* Update website/content/docs/deploy/kubernetes/vso/helm.mdx

Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>

---------

Co-authored-by: jonathanfrappier <92055993+jonathanfrappier@users.noreply.github.com>
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2025-07-22 08:12:22 -07:00

75 lines
2.7 KiB
Plaintext

---
layout: api
page_title: /sys/internal/ui/namespaces - HTTP API
description: >-
The `/sys/internal/ui/namespaces` endpoint exposes namespaces to the GUI.
---
> [!IMPORTANT]
> **Documentation Update:** Product documentation, which were located in this repository under `/website`, are now located in [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs), colocated with all other product documentation. Contributions to this content should be done in the `web-unified-docs` repo, and not this one. Changes made to `/website` content in this repo will not be reflected on the developer.hashicorp.com website.
# `/sys/internal/ui/namespaces`
The `/sys/internal/ui/namespaces` endpoint returns the namespaces that the current user has access to.
The namespaces endpoint is an authenticated endpoint used internally by the
Vault GUI to return all namespaces associated with the provided token. You do
not need to explicitly grant capabilities on the `/sys/internal/ui/namespaces`
path in your policy. For more information about namespace policies, see the
[sys/namespaces API documentation](/vault/api-docs/system/namespaces).
Internal endpoints are not intended for general use and make no guarantees on
backwards compatibility over time.
## Get namespaces
List namespaces associated with the provided Vault token for use in the GUI.
| Method | Path |
| :----- | :------------------------------- |
| `GET` | `/sys/internal/ui/namespaces` |
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request GET \
http://127.0.0.1:8200/v1/sys/internal/ui/namespaces
```
### Sample response
```json
{
"request_id": "28a1ca80-cc97-913d-8ed2-844ea501ae0d",
"lease_id": "",
"renewable": false,
"lease_duration": 0,
"data": {
"keys": [
"software/",
"software/eng/",
"software/eng/dev/",
"software/eng/qc/",
"devops/"
]
},
"wrap_info": null,
"warnings": null,
"auth": null,
"mount_type": ""
}
```
The `keys` array in the response lists all available namespaces, with each entry representing a namespace path.
In the sample response above:
- `software/` is a namespace that contains a nested namespace `eng/`.
- `software/eng/` is a nested namespace under `software/` and contains its own nested namespaces `dev/` and `qc/`.
- `software/eng/dev/` is a nested namespace under `software/eng/`.
- `software/eng/qc/` is a nested namespace under `software/eng/`.
- `devops/` is a namespace that does not have any nested namespaces.
> **Note:** The `root` namespace is never included in this list of namespaces.