Open
Description
Describe the Bug
Hi, I checked https://www.puppet.com/docs/pe/2023.7/groups_endpoint#get_v1_groups-get-v1-groups-response-format
It contains the following example:
auth_header="X-Authentication: $(puppet-access show)"
uri="https://$(puppet config print server):4433/classifier-api/v1/groups"
curl --silent --header "$auth_header" "$uri" | jq -M -r '.[] | "\(.name) \(.id)"'
But that misses the TLS certificates for authentication. Correct is:
cert="$(puppet config print hostcert)"
cacert="$(puppet config print localcacert)"
key="$(puppet config print hostprivkey)"
uri="https://$(puppet config print server):4433/classifier-api/v1/groups"
curl --silent --header "$type_header" --cert "$cert" --cacert "$cacert" --key "$key" "$uri" | jq -M -r '.[] | "\(.name) \(.id)"'
Expected Behavior
Working copy & paste example to list all groups and their IDs.