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

Sysinfo Plugin REST API

Following authentication types are supported:

  • basic (/ufmRest)

  • client (/ufmRestV2)

  • token (/ufmRestV3)

  • Description: Starts a new query to retrieve system information for each specified switch. The plugin will initiate new queries for the switches that are specified in the UFM. If no switches are specified, the plugin startS queries for all switches.

  • URL: POST ufmRestV2/plugin/sysinfo/query

  • Request Data:

    Copy
    Copied!
                

    { “switches”:[] “commands”:[“show inventory”,”show power”] “callback”:” http://localhost:8999/dummy” “one_by_one”: false “periodic_run”:{ “interval”:10 “duration”:”00:02:00” } }

    Field Name

    Description

    Example

    Default

    switches

    List of switches IPs

    ["11.222.33.44","11.333.444.55"]

    All managed switches on the fabric discover by UFM

    commands

    List of commands to run

    ["show guid","show fan"]

    None

    callback

    Endpoint to send switch responses to

    "http://localhost:5566/management/key_value"

    None

    one_by_one

    True - Sends results for the switch running on it
    False - Waits for all the switches to end and send all switch results at once

    False

    True

    ignore_ufm

    When presenting a list of switches, UFM validates that these switches are included in its database. If a switch is not recognized by UFM, it will be disregarded. To override this behavior, use the "ignore_ufm" flag

    True

    False

    periodic_run

    Executes the request repeatedly for a set duration, the interval at which it runs should be specified in seconds using the "interval" field. The period over which the request should be executed can be defined by utilizing either the "startTime" and "endTime" fields or the "duration" field.

    { "interval": 5, # seconds
    "duration": "00:30:00", # HH:MM:SS
    "startTime": "2023-02-15 9:26:30",
    "endTime": "2023-02-15 18:40:30"

    }

    None

  • Response:

    Copy
    Copied!
                

    { ”request_id”:” 114730344”}

  • Status Codes:

    • 200 – Ok

    • 400 – Bad request (bad or missing parameters)

  • Description: Deletes and cancels future requests from the plugin.

  • URL: POST ufmRestV2/plugin/sysinfo/delete/<request_id>

  • Request Data: N/A

  • Response: N/A

  • Status Codes:

    • 200 – Ok

    • 400 – Request ID not found

  • Description: This plugin allows you to cancel and delete future requests to the plugin, but the request ID is stored for later reactivation. To reactivate the sysinfo request, you need to call the Update API using the same request ID and specify the new duration for the request. You can refer to the Update Schedule Request

  • API for more information.

  • URL: GET ufmRestV2/plugin/sysinfo/cancel/<request_id>

  • Request: N/A

  • Response: N/A

  • Status Codes:

    • 200 – Ok

    • 400 – Request ID not found

  • Description: This plugin allows you to update an existing schedule request with a new duration. A duration flag can be used instead of the endTime flag (which is identical to the schedule_run Request API flags). Instead of using the endTime flag, you can use a duration flag which calculates the required end time by adding the API duration to the current time. The plugin then extends the requests for the calculated duration time. If the calculated duration is shorter than the existing duration, the plugin cancels future requests to match the new duration. If a request is cancelled, the plugin restarts and initiates future calls for it.

  • URL: POST ufmRestV2/plugin/sysinfo/update/<request_id>

  • Request Content Type – Application/json

  • Request:

    Copy
    Copied!
                

    {     “duration”:”00:20:00” }

  • Response: N/A

  • Status Codes:

    • 200 – Ok

    • 400 – Bad request (bad or missing parameters) or not found

  • Description: Returns a help message that includes the available commands and flags, as well as instructions on how to use them.

  • URL: GET ufmRestV2/plugin/sysinfo/help

  • Request Content Type – Application/json

  • Request: N/A

  • Response:

    Copy
    Copied!
                

    { "API": ["GET /version", "POST /query", "POST /cancel", "POST /update", "POST /delete","POST /dummy"], "POST /query": { "Description": "Post a query of commands to the switches and return the information as callback", "URL": "POST ufmRestV2/plugin/sysinfo/query", ..... }  "POST /cancel":{ .... } "POST /update":{ ... }... }

  • Status Codes:

    • 200 – Ok

  • Description: Returns plugin version

  • URL: GET ufmRestV2/plugin/sysinfo/Version

  • Request Content Type – Application/json

  • Request: N/A

  • Response:

    Copy
    Copied!
                

    {"version": "1.0.5-0"}

  • Status Codes:

    • 200 – Ok

© Copyright 2023, NVIDIA. Last updated on Sep 5, 2023.