From a57052bdabfad5218a91ce03c3b670ae0d0abb42 Mon Sep 17 00:00:00 2001 From: Aimee Ukasick Date: Wed, 26 Jun 2024 20:32:29 +0000 Subject: [PATCH] backport of commit 0c7746c78af2e377a0302d9c8bb08d71be2f7706 --- website/content/api-docs/agent/service.mdx | 4 +++ .../content/api-docs/exported-services.mdx | 3 +-- website/content/api-docs/kv.mdx | 6 +++++ website/content/api-docs/namespaces.mdx | 27 ++++++++++++++----- 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/website/content/api-docs/agent/service.mdx b/website/content/api-docs/agent/service.mdx index eee3dd471e3d..301827418270 100644 --- a/website/content/api-docs/agent/service.mdx +++ b/website/content/api-docs/agent/service.mdx @@ -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: @@ -769,6 +771,8 @@ The corresponding CLI command is [`consul services deregister`](/consul/commands - `ns` `(string: "")` - 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 diff --git a/website/content/api-docs/exported-services.mdx b/website/content/api-docs/exported-services.mdx index aa6521f62fb6..f7c89d4999a5 100644 --- a/website/content/api-docs/exported-services.mdx +++ b/website/content/api-docs/exported-services.mdx @@ -36,8 +36,7 @@ The table below shows this endpoint's support for ### Query Parameters -- `partition` `(string: "")` - Specifies the admin partition the services are exported from. When not specified, assumes the default value `default`. - +@include 'http-api-query-parms-partition.mdx' ### Sample Request diff --git a/website/content/api-docs/kv.mdx b/website/content/api-docs/kv.mdx index 29aa32cbe6a3..912a8b694435 100644 --- a/website/content/api-docs/kv.mdx +++ b/website/content/api-docs/kv.mdx @@ -79,6 +79,8 @@ The corresponding CLI command is [`consul kv get`](/consul/commands/kv/get). For recursive lookups, the namespace may be specified as '\*' to return results for all namespaces. +@include 'http-api-query-parms-partition.mdx' + ### Sample Request ```shell-session @@ -220,6 +222,8 @@ The corresponding CLI command is [`consul kv put`](/consul/commands/kv/put). - `ns` `(string: "")` - Specifies the namespace to query. You can also [specify the namespace through other methods](#methods-to-specify-namespace). +@include 'http-api-query-parms-partition.mdx' + ### Sample Payload The payload is arbitrary, and is loaded directly into Consul as supplied. @@ -289,6 +293,8 @@ The corresponding CLI command is [`consul kv delete`](/consul/commands/kv/delete - `ns` `(string: "")` - Specifies the namespace to query. You can also [specify the namespace through other methods](#methods-to-specify-namespace). +@include 'http-api-query-parms-partition.mdx' + ### Sample Request ```shell-session diff --git a/website/content/api-docs/namespaces.mdx b/website/content/api-docs/namespaces.mdx index 2dd41a7e9ba1..8c963d80a9f0 100644 --- a/website/content/api-docs/namespaces.mdx +++ b/website/content/api-docs/namespaces.mdx @@ -67,6 +67,8 @@ The corresponding CLI command is [`consul namespace create`](/consul/commands/na - `Meta` `(map: )` - Specifies arbitrary KV metadata to associate with the namespace. +@include 'http-api-body-options-partition.mdx' + ### Sample Payload ```json @@ -169,6 +171,10 @@ The corresponding CLI command is [`consul namespace read`](/consul/commands/name - `name` `(string: )` - Specifies the namespace to read. +### Query Parameters + +@include 'http-api-query-parms-partition.mdx' + ### Sample Request ```shell-session @@ -272,6 +278,8 @@ The corresponding CLI command is [`consul namespace update`](/consul/commands/na - `Meta` `(map: )` - Specifies arbitrary KV metadata to associate with the namespace. +@include 'http-api-body-options-partition.mdx' + ### Sample Payload ```json @@ -348,18 +356,15 @@ $ curl --request PUT \ ## Delete a Namespace -This endpoint marks a Namespace for deletion. Once marked Consul will -deleted all the associated Namespaced data in the background. Only once -all associated data has been deleted will the Namespace actually disappear. -Until then, further reads can be performed on the namespace and a `DeletedAt` -field will now be populated with the timestamp of when the Namespace was -marked for deletion. +This endpoint marks a Namespace for deletion. Once marked, Consul deletes all the associated Namespaced data in the background. Only after all associated data has been deleted, Consul deletes the Namespace. +Until then, you can perform further reads on the namespace, and a `DeletedAt` +field is populated with the timestamp of when the Namespace was marked for deletion. | Method | Path | Produces | | -------- | ------------------ | -------- | | `DELETE` | `/namespace/:name` | N/A | -This endpoint will return no data. Success or failure is indicated by the status +This endpoint returns no data. Success or failure is indicated by the status code returned. The table below shows this endpoint's support for @@ -378,6 +383,10 @@ The corresponding CLI command is [`consul namespace delete`](/consul/commands/na - `name` `(string: )` - Specifies the namespace to delete. +### Query Parameters + +@include 'http-api-query-parms-partition.mdx' + ### Sample Request ```shell-session @@ -449,6 +458,10 @@ the request has been granted any access in the namespace (read, list or write). The corresponding CLI command is [`consul namespace list`](/consul/commands/namespace/list). +### Query Parameters + +@include 'http-api-query-parms-partition.mdx' + ### Sample Request ```shell-session