open-consul/website/content/commands/namespace/read.mdx
Zachary Shilton 5b53b5aef5
website: implement mktg 032 (#9953)
* website: migrate to new nav-data format

* website: clean up unused intro content

* website: remove deprecated sidebar_title from frontmatter

* website: add react-content to fix global style import issue
2021-04-07 15:50:38 -04:00

67 lines
1.2 KiB
Plaintext

---
layout: commands
page_title: 'Commands: Namespace Read'
---
# Consul Namespace Read
Command: `consul namespace read`
<EnterpriseAlert />
This `namespace read` command reads a namespaces configuration. This was added in Consul Enterprise 1.7.0. If
ACLs are enabled then this command will require a token with `operator:read` privileges or any `read` privileges
within the target namespace.
## Usage
Usage: `consul namespace read <name>`
#### API Options
@include 'http_api_options_client.mdx'
@include 'http_api_options_server.mdx'
#### Command Options
- `-format=<string>` - How to output the results. The choices are: pretty or json
- `-meta` - Indicates that namespace metadata such as the raft indices should be
shown for the namespace
## Examples
Read a Namespace:
```shell-session
$ consul namespace read "team-1"
Name: team-1
Description:
```
Showing Raft Metadata:
```shell-session
$ consul namespace read -meta "team-1"
Name: team-1
Description:
Create Index: 339
Modify Index: 344
```
JSON Format:
```shell-session
$ consul namespace read -format=json foo
{
"Name": "foo",
"Description": "Example Namespace",
"Meta": {
"team-id": "574407f3-8b26-4c84-8e51-028bb8cbdd37"
},
"CreateIndex": 352,
"ModifyIndex": 352
}
```