api: apply consistent behaviour of the reverse query parameter (#12244)

This commit is contained in:
Luiz Aoqui
2022-03-11 19:44:52 -05:00
committed by GitHub
parent 4a21dbcfaa
commit ddbbda6561
13 changed files with 321 additions and 189 deletions

View File

@@ -70,11 +70,19 @@ The table below shows this endpoint's support for
### Parameters
- `global` `(bool: false)` - If true, only return ACL tokens that are
replicated globally to all regions.
- `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.
- `reverse` `(bool: false)` - Specifies the list of returned ACL tokens should
be sorted in the reverse order. By default ACL tokens are returned sorted in
chronological order (older ACL tokens first), or in lexicographical order by
their ID if the `prefix` or `global` query parameters are used.
### Sample Request
```shell-session

View File

@@ -43,6 +43,11 @@ The table below shows this endpoint's support for
a large number of allocations may set `task_states=false` to significantly
reduce the size of the response.
- `reverse` `(bool: false)` - Specifies the list of returned allocations should
be sorted in the reverse order. By default allocations are returned sorted in
chronological order (older evaluations first), or in lexicographical order by
their ID if the `prefix` query parameter is used.
### Sample Request
```shell-session

View File

@@ -50,9 +50,10 @@ The table below shows this endpoint's support for
results. Consider using pagination or a query parameter to reduce resource
used to serve the request.
- `ascending` `(bool: false)` - Specifies the list of returned deployments should
be sorted in chronological order (oldest evaluations first). By default deployments
are returned sorted in reverse chronological order (newest deployments first).
- `reverse` `(bool: false)` - Specifies the list of returned deployments should
be sorted in the reverse order. By default deployments are returned sorted in
chronological order (older deployments first), or in lexicographical order
by their ID if the `prefix` query parameter is used.
### Sample Request

View File

@@ -57,9 +57,10 @@ The table below shows this endpoint's support for
Specifying `*` will return all evaluations across all authorized namespaces.
This parameter is used before any `filter` expression is applied.
- `ascending` `(bool: false)` - Specifies the list of returned evaluations should
be sorted in chronological order (oldest evaluations first). By default evaluations
are returned sorted in reverse chronological order (newest evaluations first).
- `reverse` `(bool: false)` - Specifies the list of returned evaluations should
be sorted in the reverse order. By default evaluations are returned sorted in
chronological order (older evaluations first), or in lexicographical order by
their ID if the `prefix` query parameter is used.
### Sample Request