From 1f9ca248e19e82c09ee06b0418df3dc08b3176e6 Mon Sep 17 00:00:00 2001 From: Jared Kirschner Date: Tue, 15 Mar 2022 10:46:56 -0700 Subject: [PATCH] docs: add filtered by ACLs header curl example --- website/content/api-docs/index.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/website/content/api-docs/index.mdx b/website/content/api-docs/index.mdx index 768e3865ab..681ee562ec 100644 --- a/website/content/api-docs/index.mdx +++ b/website/content/api-docs/index.mdx @@ -106,6 +106,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