NVIDIA UFM Enterprise REST API Guide v6.15.1
NVIDIA UFM Enterprise REST API Guide v6.15.1

Logging REST API

  • Description – Retrieves different types of logs.

  • Request URL – /ufmRest/app/logs/<type>

  • Types:

    • Event

    • SM

    • UFM

  • Description – Retrieves a log file of a specific type.

  • Request URL – GET /ufmRest/app/logs/<type>[&length=<number>]

    • Length is an optional limit on the number of returned lines and defaults to 500. It cannot be set to more than 10000

  • Request Content Type – Application/json

  • Response – content attribute will contain the logs text

  • Status Codes

    • 200 – OK

    • 400 – bad request (bad or missing parameters)

  • Description – Retrieves event logs with support for server pagination.

  • Request URL – GET ufmRest/app/logs/history_events?page_number=<page_namer>&rpp=<page size>

  • Request Content Type – Application/json

  • Response – Content attribute contains JSON list

  • Status Codes

    • 200 – OK

    • 400 – bad request (bad or missing parameters)

    • Description – Create a file with log entries from a specific time range (including archived logs)

    • Request URL – POST /ufmRest/app/logs/<type>/history?start=<timestamp>&end=<timestamp>[&length=<number>][&tz=<timezone>][& event_src=<events src>]

      • Start and end are the time range in milliseconds

      • Length is an optional limit on the number of returned lines and defaults to configuration option max_history_lines (100000)

      • Tz is an optional timezone and defaults to utc. Must be one of these values.

    • Event Source is an optional parameter that is only valid if the log type is 'Event'. It must be specified as either 'device' or 'link'.Request Content Type – Application/json

    • Response – the HTTP Response Location Header will contain URI with job ID created for generating the file. Once the job is successfully finished, its summary field will have the following format:

      Copy
      Copied!
                  

      {"result_exceeds_limit":false,"file_name":"event_history_admin","limit":10000}

      Where limit is the given/default length, result_exceeds_limit indicates whether increasing the limit will return more data, and file_name points to the result file. The file can be obtained by using:

      Copy
      Copied!
                  

      GET /ufm_web/<file_name>

    • Status Codes

      • 202 – accepted. Job ID created successfully

      • 400 – bad request (bad or missing parameters)

    • Description – This REST API stores statistics into the usage statistics file which is stored in the file system.

    • Request URL – POST /ufmRest/app/usage_statistics

    • Request Content Type – Application/json

    • Request data example:

      Copy
      Copied!
                  

       { “events”: [    "2023-11-01 10:38:36\tadmin\tufm\tUFM application has been started",    "2023-11-01 10:38:36\tadmin\tufm\tTimepicker has been set: Last 5 Minutes",    "2023-11-01 10:39:13\tadmin\tufm\tUFM window has been hidden" ]] }

    • Response:

      Copy
      Copied!
                  

      {   "file_path":"/opt/ufm/files/log/usage_statistics/usage_statistics" }

    • Status Code:

      • 202 – Accepted

    © Copyright 2023, NVIDIA. Last updated on Jan 12, 2024.