Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PE: Classifier API examples are wrong #1164

Open
bastelfreak opened this issue Jul 19, 2024 · 1 comment
Open

PE: Classifier API examples are wrong #1164

bastelfreak opened this issue Jul 19, 2024 · 1 comment
Labels
triaged This ticket has been accepted to our backlog and migrated internally

Comments

@bastelfreak
Copy link

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.

Steps to Reproduce

Environment

Additional Context

@lisarobertson lisarobertson added the triaged This ticket has been accepted to our backlog and migrated internally label Jul 25, 2024
Copy link

Migrated issue to PUPDOC-5678

@lisarobertson lisarobertson changed the title PE Classifier API examples are wrong PE: Classifier API examples are wrong Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged This ticket has been accepted to our backlog and migrated internally
Projects
None yet
Development

No branches or pull requests

2 participants