Service Metrics Data API
This topic covers how to programmatically retrieve usage metrics from the API. This API is not currently available in the Swagger documentation that displays within the Nexus Repository user interface.
The nexus:metrics:read
privilege is required to use this API.
Query the /service/metrics/data
endpoint for the fields specified in the table below.
Metric* | JSON Path | Notes |
---|---|---|
Total Components |
| Shows current total |
Max Components (30 days) |
| Track |
Requests per Day |
| Shows current daily total |
* "Metric" in this instance refers to the corresponding metric available in the user interface via the Usage Center. For maximum data parity with the user interface metrics information, you will want to retrieve this data before midnight (based on server time) each day.