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

REST API Complementary Information

The section provides complementary information with regard to all UFM REST APIs.

In addition to the existing REST API, users can configure the UFM to expose the site_name (configurable) field in all the supported REST APIs. The site_name field can be used to identify the current InfiniBand fabric that is managed by the UFM Enterprise.

To expose the site_name field, perform the following:

  • In gv.cfg and in the [Server] section, set a value for "site_name"

  • In gv.cfg and in the [Server] section, set "expose_site_name" to "true"

  • Restart UFM for the changes to take effect

For basic authentication, run:

Copy
Copied!
            

curl -k https://<ufm-ip>/ufmRest/resources/systems -u <username>:<password>

For session-based Authentication, follow the below instructions:

  1. Run the below command to log in and store the session in a cookie file.

    Copy
    Copied!
                

    curl -k -f -X POST -c cookies.txt -d "httpd_username=<user>" -d "httpd_password=<password>" https://<ufm-ip>/dologin

  2. Use the session saved earlier to make as many ufmRestV2 requests as needed, for instance:

    Copy
    Copied!
                

    curl -k –cookie cookies.txt https://<ufm-ip>/ufmRestV2/reources/systems

For token-based authentication, follow the below instructions

  1. Create an access token using either the user's credentials or session:

    Copy
    Copied!
                

    curl -k -X POST https://<ufm-ip>/ufmRest/app/tokens -u username:password

  2. Access ufmRestV3 using the access token generated earlier:

    Copy
    Copied!
                

    curl -k https://<ufm-ip>/ufmRest/resources/systems -H "Authorization:Basic <access_token>"

© Copyright 2024, NVIDIA. Last updated on Jun 11, 2024.