adding namespace docs (#5133)
This commit is contained in:
parent
d25b7fa477
commit
4d574c1d6c
102
website/source/api/system/namespaces.html.md
Normal file
102
website/source/api/system/namespaces.html.md
Normal file
|
@ -0,0 +1,102 @@
|
|||
---
|
||||
layout: "api"
|
||||
page_title: "/sys/namespaces - HTTP API"
|
||||
sidebar_current: "docs-http-system-namespaces"
|
||||
description: |-
|
||||
The `/sys/namespaces` endpoint is used manage namespaces in Vault.
|
||||
---
|
||||
|
||||
# `/sys/namespaces`
|
||||
|
||||
The `/sys/namespaces` endpoint is used manage namespaces in Vault.
|
||||
|
||||
## List Namespaces
|
||||
|
||||
This endpoints lists all the namespaces.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| :------- | :--------------------------- | :--------------------- |
|
||||
| `LIST` | `/sys/namespaces` | `200 application/json` |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```
|
||||
$ curl \
|
||||
--header "X-Vault-Token: ..." \
|
||||
-X LIST \
|
||||
http://127.0.0.1:8200/v1/sys/namespaces
|
||||
```
|
||||
|
||||
### Sample Response
|
||||
|
||||
```json
|
||||
[
|
||||
"ns1/",
|
||||
"ns2/"
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
## Create Namespace
|
||||
|
||||
This endpoint creates a namespace at the givent path.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| :------- | :--------------------------- | :--------------------- |
|
||||
| `POST` | `/sys/namespaces/:path` | `204 (empty body)` |
|
||||
|
||||
### Parameters
|
||||
|
||||
- `path` `(string: <required>)` – Specifies the path where the namespace
|
||||
will be namespace. This is specified as part of the URL.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```
|
||||
$ curl \
|
||||
--header "X-Vault-Token: ..." \
|
||||
--request POST \
|
||||
http://127.0.0.1:8200/v1/sys/namespaces/ns1
|
||||
```
|
||||
|
||||
## Delete Namespace
|
||||
|
||||
This endpoint deletes a namespace at the specified path.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| :------- | :--------------------------- | :--------------------- |
|
||||
| `DELETE` | `/sys/namespaces/:path` | `204 (empty body) ` |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```
|
||||
$ curl \
|
||||
--header "X-Vault-Token: ..." \
|
||||
--request DELETE \
|
||||
http://127.0.0.1:8200/v1/sys/namespaces/ns1
|
||||
```
|
||||
|
||||
## Read Namespace Information
|
||||
|
||||
This endpoint get the metadata for the given namespace path.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| :------- | :--------------------------- | :--------------------- |
|
||||
| `GET` | `/sys/namespaces/:path` | `200 application/json` |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```
|
||||
$ curl \
|
||||
--header "X-Vault-Token: ..." \
|
||||
http://127.0.0.1:8200/v1/sys/namespaces/ns1
|
||||
```
|
||||
|
||||
### Sample Response
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "gsudj",
|
||||
"path": "ns1/"
|
||||
}
|
||||
```
|
56
website/source/docs/commands/namespace.html.md
Normal file
56
website/source/docs/commands/namespace.html.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "namespace - Command"
|
||||
sidebar_current: "docs-commands-namespace"
|
||||
description: |-
|
||||
The "namespace" command groups subcommands for interacting with namespaces.
|
||||
---
|
||||
|
||||
# namespace
|
||||
|
||||
The `namespace` command groups subcommands for interacting with namespaces.
|
||||
|
||||
## Examples
|
||||
|
||||
List all namespaces:
|
||||
|
||||
```text
|
||||
$ vault namespace list
|
||||
```
|
||||
|
||||
Create a namespace at the path `ns1/`:
|
||||
|
||||
```text
|
||||
$ vault namespace create ns1/
|
||||
```
|
||||
|
||||
Delete the namespace at path `ns1/`:
|
||||
|
||||
```text
|
||||
$ vault namespace delete ns1/
|
||||
```
|
||||
|
||||
Lookup the namespace information at path `ns1/`:
|
||||
|
||||
```text
|
||||
$ vault namespace lookup ns1/
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```text
|
||||
Usage: vault namespace <subcommand> [options] [args]
|
||||
|
||||
This command groups subcommands for interacting with Vault namespaces.
|
||||
These set of subcommands operate on the context of the namespace that the
|
||||
current logged in token belongs to.
|
||||
|
||||
Subcommands:
|
||||
create Create a new namespace
|
||||
delete Delete an existing namespace
|
||||
list List child namespaces
|
||||
lookup Create a new namespace
|
||||
```
|
||||
|
||||
For more information, examples, and usage about a subcommand, click on the name
|
||||
of the subcommand in the sidebar.
|
|
@ -243,6 +243,9 @@
|
|||
<li<%= sidebar_current("docs-http-system-license") %>>
|
||||
<a href="/api/system/license.html"><tt>/sys/license</tt></a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-http-system-namespaces") %>>
|
||||
<a href="/api/system/namespaces.html"><tt>/sys/namespaces</tt></a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-http-system-mfa") %>>
|
||||
<a href="/api/system/mfa.html"><tt>/sys/mfa</tt></a>
|
||||
<ul class="nav">
|
||||
|
|
|
@ -271,6 +271,9 @@
|
|||
<li<%= sidebar_current("docs-commands-path-help") %>>
|
||||
<a href="/docs/commands/path-help.html">path-help</a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-commands-namespace") %>>
|
||||
<a href="/docs/commands/namespace.html">namespace</a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-commands-plugin") %>>
|
||||
<a href="/docs/commands/plugin.html">plugin</a>
|
||||
<ul class="nav">
|
||||
|
|
Loading…
Reference in a new issue