document namespace=* in relevant APIs
This commit is contained in:
parent
970ccedd1f
commit
68ec45dd0f
|
@ -32,6 +32,9 @@ The table below shows this endpoint's support for
|
|||
even number of hexadecimal characters (0-9a-f). This is specified as a query
|
||||
string parameter.
|
||||
|
||||
- `namespace` `(string: "default")` - Specifies the namespace to search. Specifying
|
||||
`*` would return all allocations across all the authorized namespaces.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-session
|
||||
|
@ -44,6 +47,11 @@ $ curl \
|
|||
https://localhost:4646/v1/allocations?prefix=a8198d79
|
||||
```
|
||||
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/allocations?namespace=*&prefix=a8198d79
|
||||
```
|
||||
|
||||
### Sample Response
|
||||
|
||||
```json
|
||||
|
|
|
@ -90,6 +90,17 @@ $ curl \
|
|||
https://localhost:4646/v1/jobs
|
||||
```
|
||||
|
||||
## Namespaces
|
||||
|
||||
Nomad Enterprise has support for namespaces, which allow jobs and their associated objects to be segmented from each other and other users of the cluster. When using non-default namespace, the API request must pass the target namespace as an API query parameter.
|
||||
|
||||
Here is an example using curl:
|
||||
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/jobs?namespace=qa
|
||||
```
|
||||
|
||||
## Blocking Queries
|
||||
|
||||
Many endpoints in Nomad support a feature known as "blocking queries". A
|
||||
|
|
|
@ -30,6 +30,9 @@ The table below shows this endpoint's support for
|
|||
- `prefix` `(string: "")` - Specifies a string to filter jobs on based on
|
||||
an index prefix. This is specified as a query string parameter.
|
||||
|
||||
- `namespace` `(string: "default")` - Specifies the target namespace. Specifying
|
||||
`*` would return all jobs across all the authorized namespaces.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-session
|
||||
|
@ -40,6 +43,10 @@ $ curl https://localhost:4646/v1/jobs
|
|||
$ curl https://localhost:4646/v1/jobs?prefix=team
|
||||
```
|
||||
|
||||
```shell-session
|
||||
$ curl https://localhost:4646/v1/jobs?namespace=*&prefix=team
|
||||
```
|
||||
|
||||
### Sample Response
|
||||
|
||||
```json
|
||||
|
|
Loading…
Reference in a new issue