Skip to content

Commit

Permalink
DOCS: CE-556 Add partition parameter to API endpoint docs (#21374)
Browse files Browse the repository at this point in the history
* CD-556 rename partition partial that's only used in CLI

Update CLI pages for partial rename

API: Add partial for partition as body option
API: Add partial for partition as query parameter

Update API peering and members pages

* acl/auth-methods.mdx

Update partition partials to be generic

* binding-rules.mdx, policies.mdx

* roles.mdx, templated-policies.mdx

* tokens.mdx, catalog.mdx, config.mdx, intentions.mdx

* service.mdx, exported-services.mdx, kv.mdx, namespaces.mdx

* Apply suggestions from code review

Co-authored-by: Jeff Boruszak <[email protected]>

* Add partial to acl/auth-methods.mdx

Fix headings indent in a few files.

* Update website/content/api-docs/acl/auth-methods.mdx

Co-authored-by: Jeff Boruszak <[email protected]>

---------

Co-authored-by: Jeff Boruszak <[email protected]>
  • Loading branch information
aimeeu and boruszak committed Jul 18, 2024
1 parent a9d92d0 commit 654528c
Show file tree
Hide file tree
Showing 81 changed files with 190 additions and 90 deletions.
17 changes: 13 additions & 4 deletions website/content/api-docs/acl/auth-methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ The corresponding CLI command is [`consul acl auth-method create`](/consul/comma
prefixed-${serviceaccount.name}
```

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -175,9 +177,11 @@ The corresponding CLI command is [`consul acl auth-method read`](/consul/command

### Query Parameters

- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the auth method you lookup.
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the auth method you look up.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -291,9 +295,11 @@ The corresponding CLI command is [`consul acl auth-method update`](/consul/comma
same values that are usable by the `Selector` syntax. For example:

```text
prefixed-${serviceaccount.name}
prefixed-${serviceaccount.name}
```

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -369,6 +375,8 @@ The corresponding CLI command is [`consul acl auth-method delete`](/consul/comma
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the auth method you delete.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -408,8 +416,9 @@ The corresponding CLI command is [`consul acl auth-method list`](/consul/command
The namespace may be specified as '\*' to return results for all namespaces.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

The namespace may be specified as '\*' and then
results will be returned for all namespaces.
The namespace may be specified as '\*' and then results are returned for all namespaces.

@include 'http-api-query-parms-partition.mdx'

## Sample Request

Expand Down
14 changes: 12 additions & 2 deletions website/content/api-docs/acl/binding-rules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ The corresponding CLI command is [`consul acl binding-rule create`](/consul/comm
This field takes precedence over the `ns` query parameter,
one of several [other methods to specify the namespace](#methods-to-specify-namespace).

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -238,6 +240,8 @@ The corresponding CLI command is [`consul acl binding-rule read`](/consul/comman
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the binding rule you lookup.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -423,6 +427,8 @@ The corresponding CLI command is [`consul acl binding-rule update`](/consul/comm
This field takes precedence over the `ns` query parameter,
one of several [other methods to specify the namespace](#methods-to-specify-namespace).

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -489,6 +495,8 @@ The corresponding CLI command is [`consul acl binding-rule delete`](/consul/comm
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the binding rule you delete.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -522,7 +530,7 @@ The table below shows this endpoint's support for

The corresponding CLI command is [`consul acl binding-rule list`](/consul/commands/acl/binding-rule/list).

## Query Parameters
### Query Parameters

- `authmethod` `(string: "")` - Filters the binding rule list to those binding
rules that are linked with the specific named auth method.
Expand All @@ -531,7 +539,9 @@ The corresponding CLI command is [`consul acl binding-rule list`](/consul/comman
The namespace may be specified as '\*' to return results for all namespaces.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

## Sample Request
@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
$ curl --request GET http://127.0.0.1:8500/v1/acl/binding-rules
Expand Down
12 changes: 11 additions & 1 deletion website/content/api-docs/acl/policies.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ The corresponding CLI command is [`consul acl policy create`](/consul/commands/a
This field takes precedence over the `ns` query parameter,
one of several [other methods to specify the namespace](#methods-to-specify-namespace).

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -170,6 +172,8 @@ The corresponding CLI command is [`consul acl policy read -name=<string>`](/cons
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the policy you lookup.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -242,6 +246,8 @@ The corresponding CLI command is [`consul acl policy update`](/consul/commands/a
This field takes precedence over the `ns` query parameter,
one of several [other methods to specify the namespace](#methods-to-specify-namespace).

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -307,6 +313,8 @@ The corresponding CLI command is [`consul acl policy delete`](/consul/commands/a
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the policy you delete.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -346,7 +354,9 @@ The corresponding CLI command is [`consul acl policy list`](/consul/commands/acl
The namespace may be specified as '\*' to return results for all namespaces.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

## Sample Request
@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
$ curl --request GET http://127.0.0.1:8500/v1/acl/policies
Expand Down
12 changes: 12 additions & 0 deletions website/content/api-docs/acl/roles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ The corresponding CLI command is [`consul acl role create`](/consul/commands/acl
This field takes precedence over the `ns` query parameter,
one of several [other methods to specify the namespace](#methods-to-specify-namespace).

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -223,6 +225,8 @@ The corresponding CLI command is [`consul acl role read`](/consul/commands/acl/r
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the role you lookup.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -306,6 +310,8 @@ The corresponding CLI command is [`consul acl role read -name=<string>`](/consul
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the role you lookup.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -418,6 +424,8 @@ The corresponding CLI command is [`consul acl role update`](/consul/commands/acl
This field takes precedence over the `ns` query parameter,
one of several [other methods to specify the namespace](#methods-to-specify-namespace).

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -523,6 +531,8 @@ The corresponding CLI command is [`consul acl role delete`](/consul/commands/acl
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the role you delete.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -565,6 +575,8 @@ The corresponding CLI command is [`consul acl role list`](/consul/commands/acl/r
The namespace may be specified as '\*' to return results for all namespaces.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

## Sample Request

```shell-session
Expand Down
2 changes: 2 additions & 0 deletions website/content/api-docs/acl/templated-policies.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ The corresponding CLI command is [`consul acl templated-policy preview`](/consul

- `Name` `(string: <optional>)` - Specifies the value of the `name` variable in the templated policy variables.

@include 'http-api-body-options-partition.mdx'

### Sample payload

```json
Expand Down
12 changes: 12 additions & 0 deletions website/content/api-docs/acl/tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ The corresponding CLI command is [`consul acl token create`](/consul/commands/ac
This field takes precedence over the `ns` query parameter,
one of several [other methods to specify the namespace](#methods-to-specify-namespace).

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -217,6 +219,8 @@ The corresponding CLI command is [`consul acl token read`](/consul/commands/acl/
- `expanded` `(bool: false)` - If this field is set, the contents of all policies and
roles affecting the token will also be returned.

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -497,6 +501,8 @@ The corresponding CLI command is [`consul acl token update`](/consul/commands/ac
This field takes precedence over the `ns` query parameter,
one of several [other methods to specify the namespace](#methods-to-specify-namespace).

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -591,6 +597,8 @@ The corresponding CLI command is [`consul acl token clone`](/consul/commands/acl
This field takes precedence over the `ns` query parameter,
one of several [other methods to specify the namespace](#methods-to-specify-namespace).

@include 'http-api-body-options-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -668,6 +676,8 @@ The corresponding CLI command is [`consul acl token delete`](/consul/commands/ac
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the token you delete.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -723,6 +733,8 @@ The corresponding CLI command is [`consul acl token list`](/consul/commands/acl/
The namespace may be specified as '\*' to return results for all namespaces.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down
2 changes: 2 additions & 0 deletions website/content/api-docs/agent/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ The corresponding CLI command is [`consul members`](/consul/commands/members).
network segment). When querying a server, setting this to the special string `_all`
will show members in all segments.

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down
4 changes: 4 additions & 0 deletions website/content/api-docs/agent/service.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,8 @@ The `/agent/service/register` endpoint supports camel case and _snake case_ for
`false`. See [anti-entropy syncs](/consul/docs/architecture/anti-entropy) for
additional information.

@include 'http-api-body-options-partition.mdx'

#### Connect Structure

For the `Connect` field, the parameters are:
Expand Down Expand Up @@ -769,6 +771,8 @@ The corresponding CLI command is [`consul services deregister`](/consul/commands
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the service you deregister.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down
4 changes: 4 additions & 0 deletions website/content/api-docs/catalog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ The corresponding CLI command is [`consul catalog nodes`](/consul/commands/catal
- `filter` `(string: "")` - Specifies the expression used to filter the
queries results prior to returning the data.

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -422,6 +424,8 @@ The corresponding CLI command is [`consul catalog services`](/consul/commands/ca
- `filter` `(string: "")` - Specifies the expression used to filter the
queries results prior to returning the data.

@include 'http-api-query-parms-partition.mdx'

### Filtering

The filter will be executed against each Service mapping within the catalog.
Expand Down
8 changes: 8 additions & 0 deletions website/content/api-docs/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ The ACL required depends on the config entry being written:
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the config entry you apply.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Payload

```json
Expand Down Expand Up @@ -150,6 +152,8 @@ The ACL required depends on the config entry kind being read:
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the config entry you lookup
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -228,6 +232,8 @@ The corresponding CLI command is [`consul config list`](/consul/commands/config/
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the config entries you lookup.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down Expand Up @@ -321,6 +327,8 @@ The corresponding CLI command is [`consul config delete`](/consul/commands/confi
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace of the config entry you delete.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).

@include 'http-api-query-parms-partition.mdx'

### Sample Request

```shell-session
Expand Down
Loading

0 comments on commit 654528c

Please sign in to comment.