POST /v1/update-classes
Trigger the node classifier to retrieve updated class and environment definitions from the primary server. The classifier service also uses this endpoint when you refresh classes in the console.
Request format
When Forming node classifier API requests to this endpoint, the default request
updates definitions for all environments. If you only want to update a specific
environment, append the environment
parameter to the
URI path. For example, this request only updates definitions for the production
environment:
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/update-classes?environment=production" curl --cert "$cert" --cacert "$cacert" --key "$key" --request POST "$uri"
Response format
If the definitions were successfully updated, the service returns a 201
response
with an empty body.
Error responses
If there is an error, Node classifier API errors provide error information in the
kind
key.
If the node classifier gets an unexpected status from the primary server, the service
returns 500 Server Error unexpected-response
and a copy of the
response from the primary server.