diff --git a/website/content/api-docs/coordinate.mdx b/website/content/api-docs/coordinate.mdx index 52d6c1ffeb..2e6c5fe2b9 100644 --- a/website/content/api-docs/coordinate.mdx +++ b/website/content/api-docs/coordinate.mdx @@ -78,6 +78,8 @@ within the same area. This endpoint returns the LAN network coordinates for all nodes in a given datacenter. +@include 'http_api_results_filtered_by_acls.mdx' + | Method | Path | Produces | | ------ | ------------------- | ------------------ | | `GET` | `/coordinate/nodes` | `application/json` | diff --git a/website/content/api-docs/index.mdx b/website/content/api-docs/index.mdx index c47e554a91..481180c940 100644 --- a/website/content/api-docs/index.mdx +++ b/website/content/api-docs/index.mdx @@ -110,6 +110,27 @@ of results, because some have been filtered out by ACL policies. In order to limit information leakage, this header is only present for requests authenticated by a valid ACL token. +The following example uses `curl` to view the +`X-Consul-Results-Filtered-By-ACLs` response header. + +```shell-session +$ curl \ + --header "X-Consul-Token: " \ + --include \ + http://127.0.0.1:8500/v1/catalog/services + +HTTP/1.1 200 OK +Content-Type: application/json +... +X-Consul-Default-Acl-Policy: deny +X-Consul-Results-Filtered-By-Acls: true + +{ + "redis": [], + "postgresql": ["primary", "secondary"] +} +``` + ## UUID Format UUID-format identifiers generated by the Consul API use the diff --git a/website/content/partials/http_api_results_filtered_by_acls.mdx b/website/content/partials/http_api_results_filtered_by_acls.mdx new file mode 100644 index 0000000000..6afea76f84 --- /dev/null +++ b/website/content/partials/http_api_results_filtered_by_acls.mdx @@ -0,0 +1,3 @@ +The HTTP response includes the `X-Consul-Results-Filtered-By-ACLs: true` header +if the response array excludes results due to ACL policy configuration. +Refer to the [HTTP API documentation](/api-docs#results-filtered-by-acls) for more information.