Metrics APIs
Chef 360 Platform provides a set of APIs to access metrics data. These APIs retrieve metrics data for various services and components in the Chef 360 Platform.
Warning
The metrics APIs are an experimental feature and subject to change.
Metrics API token
To access the metrics APIs, you must add an API token to Chef 360 Platform.
Follow these steps to add the token:
In the Replicated UI configuration screen during the Chef 360 Platform installation, enable Advanced Configuration.
In the API/UI Settings, enter the token in the Metrics API Token field.
Tokens have the following requirements:
- The token must be at least 16 characters long.
- It can include alphanumeric characters, underscores
_
, and hyphens-
.
API headers
Use the following headers when calling the metrics APIs:
API-Key
: Set this toSTATIC-AUTH-TOKEN
.API-Secret
: Use the token value configured in the Replicated UI.
Example
This example uses curl to call the metrics APIs with the API token.
curl --location 'http://<HOST>:<PORT>/platform/user-accounts/v1/metrics' \
--header 'API-Key: STATIC-AUTH-TOKEN' \
--header 'API-Secret: <METRICS_TOKEN>'
Replace <METRICS_TOKEN>
with the API token entered in the Metrics API Token field.