Merge pull request #6444 from hashicorp/docs-add-prefix-param-to-acl-endpoints

docs: improve documentation for `prefix` param on API endpoints
This commit is contained in:
Luiz Aoqui 2019-10-08 19:08:27 -04:00 committed by GitHub
commit 3be8364636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 40 additions and 9 deletions

View File

@ -28,6 +28,12 @@ The table below shows this endpoint's support for
| ---------------- | ----------------- | ------------ |
| `YES` | `all` | `management` for all policies.<br>Output when given a non-management token will be limited to the policies on the token itself |
### Parameters
- `prefix` `(string: "")` - Specifies a string to filter ACL policies based on
a name prefix. Because the value is decoded to bytes, the prefix must have an
even number of hexadecimal characters (0-9a-f). This is specified as a query
string parameter.
### Sample Request
@ -36,6 +42,11 @@ $ curl \
https://localhost:4646/v1/acl/policies
```
```text
$ curl \
https://localhost:4646/v1/acl/policies?prefix=prod
```
### Sample Response
```json

View File

@ -70,6 +70,12 @@ The table below shows this endpoint's support for
| ---------------- | ----------------- | ------------ |
| `YES` | `all` | `management` |
### Parameters
- `prefix` `(string: "")` - Specifies a string to filter ACL tokens based on an
accessor ID prefix. Because the value is decoded to bytes, the prefix must
have an even number of hexadecimal characters (0-9a-f). This is specified as
a query string parameter.
### Sample Request
@ -78,6 +84,12 @@ $ curl \
https://localhost:4646/v1/acl/tokens
```
```text
$ curl \
--request POST \
https://localhost:4646/v1/acl/bootstrap?prefix=3da2ed52
```
### Sample Response
```json

View File

@ -28,8 +28,10 @@ The table below shows this endpoint's support for
### Parameters
- `prefix` `(string: "")`- Specifies a string to filter allocations on based on
an index prefix. This is specified as a query string parameter.
- `prefix` `(string: "")`- Specifies a string to filter allocations based on an
ID prefix. Because the value is decoded to bytes, the prefix must have an
even number of hexadecimal characters (0-9a-f). This is specified as a query
string parameter.
### Sample Request

View File

@ -29,7 +29,9 @@ The table below shows this endpoint's support for
### Parameters
- `prefix` `(string: "")`- Specifies a string to filter deployments based on
an index prefix. This is specified as a query string parameter.
an ID prefix. Because the value is decoded to bytes, the prefix must have an
even number of hexadecimal characters (0-9a-f) .This is specified as a query
string parameter.
### Sample Request

View File

@ -28,8 +28,10 @@ The table below shows this endpoint's support for
### Parameters
- `prefix` `(string: "")`- Specifies a string to filter evaluations on based on
an index prefix. This is specified as a query string parameter.
- `prefix` `(string: "")`- Specifies a string to filter evaluations based on an
ID prefix. Because the value is decoded to bytes, the prefix must have an
even number of hexadecimal characters (0-9a-f). This is specified as a query
string parameter.
### Sample Request
@ -40,7 +42,7 @@ $ curl \
```text
$ curl \
https://localhost:4646/v1/evaluations?prefix=25ba81c
https://localhost:4646/v1/evaluations?prefix=25ba81
```
### Sample Response

View File

@ -28,8 +28,10 @@ The table below shows this endpoint's support for
### Parameters
- `prefix` `(string: "")`- Specifies a string to filter nodes on based on an
index prefix. This is specified as a query string parameter.
- `prefix` `(string: "")`- Specifies a string to filter nodes based on an ID
prefix. Because the value is decoded to bytes, the prefix must have an even
number of hexadecimal characters (0-9a-f). This is specified as a query
string parameter.
### Sample Request
@ -40,7 +42,7 @@ $ curl \
```text
$ curl \
http://localhost:4646/v1/nodes?prefix=prod
http://localhost:4646/v1/nodes?prefix=f7476465
```
### Sample Response