Skip to main content

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

gauges."nexus.analytics.component_total_count".value

Shows current total

Max Components (30 days)

max(gauges."nexus.analytics.component_total_count".value)

Track component_total_count over 30 days to get a peak value

Requests per Day

gauges."nexus.analytics.content_request_count".value.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.