NVIDIA UFM Enterprise REST API Guide v6.22.1

Metrics Collector REST API

This Metrics Collector provides detailed analytics about UFM API usage within specified time range.

The feature aggregates API call statistics and provides both high-level and detailed views of API performance and usage patterns.

  • Description – an asynchronous job that executes UFM API metrics collecting.

  • Request URL – POST /ufmRest/app/metrics/collect?last_x_hours=<int>&start_time =<timestamp>&end_time=<timestamp>&api=<string>&include_ts=<bool>&tz=<pytz >

    • optional arguments:

      • last_x_hours- will collect metrics from the last X hours, default last 3 hours.

      • start_time, end_time- will collect metrics within specific time range(number of seconds that have elapsed since epoch), default is last 3 hours.

      • api- will collect metrics only for this API, if not specified will present high level of the data.

      • include_ts- will return a list of timestamps and the accepted status code (api is required as well).

  • Request Content Type – Application/json

  • Response – redirection for job status.

    Status Codes

    • 202 – ACCEPTED, in case job started.

    • 500 - INTERNAL_SERVER_ERROR, in case job execution failed

  • Description – This API will return the processed data by job_id.

  • Request URL – GET /ufmRest/app/metrics/<job_id>

    • Required arguments:

      • job_id- the job_id received from the collect metrics API.

  • Request Content Type – Application/json

  • Response – parsed results in JSON format

  • Status Codes

    • 200 – OK

    • 500 - BAD_REQUEST, in case job_id doesn't exist.

Examples:

  1. For collecting metrics for the last 2 hours:

    1. POST ufm_server/ufmRest/app/metrics/collect?last_x_hours=2

    2. will return redirection with status_code 202 and a job_id(1).

    3. after job is done(GET ufm_server/ufmRest/jobs/1),

    4. GET ufm_server/ufmRest/app/metrics/1.

Copy
Copied!
            

[ { "url": "monitoring/aggr_topx", "method": "GET", "status": "2XX", "number_of_requests": 110 }, { "url": "notifications", "method": "GET", "status": "2XX", "number_of_requests": 69 }, { "url": "monitoring/attribute_values", "method": "GET", "status": "2XX", "number_of_requests": 36 }, { "url": "telemetry/config", "method": "GET", "status": "2XX", "number_of_requests": 1 }, ]

2. For collecting metrics from specific API(jobs) for the last 2 hours:

    1. POST ufm_server/ufmRest/app/metrics/collect?last_x_hours=2&api=jobs

    2. will return redirection with status_code 202 and a job_id(1).

    3. after job is done(GET ufm_server/ufmRest/jobs/1),

    4. GET ufm_server/ufmRest/app/metrics/1.

Copy
Copied!
            

[ { "url": "jobs", "method": "GET", "status": "5XX", "number_of_requests": 2 }, { "url": "jobs/1", "method": "GET", "status": "2XX", "number_of_requests": 2 }, { "url": "jobs/1", "method": "POST", "status": "5XX", "number_of_requests": 1 }, { "url": "jobs/2", "method": "GET", "status": "2XX", "number_of_requests": 1 } ]

3. For collecting metrics from specific API(jobs) for the last 2 hours including timestamps:

    1. POST ufm_server/ufmRest/app/metrics/collect?last_x_hours=2&api=jobs&include_ts=true

    2. will return redirection with status_code 202 and a job_id(1).

    3. after job is done(GET ufm_server/ufmRest/jobs/1),

    4. GET ufm_server/ufmRest/app/metrics/1.

Copy
Copied!
            

[ [ "20/Jul/2025:15:12:09 +0300", "500" ], [ "20/Jul/2025:15:12:26 +0300", "500" ], [ "20/Jul/2025:15:13:21 +0300", "200" ], [ "20/Jul/2025:15:18:45 +0300", "500" ], [ "20/Jul/2025:15:18:51 +0300", "200" ], [ "20/Jul/2025:15:21:08 +0300", "200" ], [ "20/Jul/2025:15:33:37 +0300", "202" ], [ "20/Jul/2025:15:36:05 +0300", "202" ] ]

© Copyright 2025, NVIDIA. Last updated on Aug 7, 2025.