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:
curl -k https://<ufm-ip>/ufmRest/resources/systems -u <username>:<password>
For session-based Authentication, follow the below instructions:
Run the below command to log in and store the session in a cookie file.
curl -k -f -X POST -c cookies.txt -d
"httpd_username=<user>"
-d"httpd_password=<password>"
https://<ufm-ip>/dologin
Use the session saved earlier to make as many ufmRestV2 requests as needed, for instance:
curl -k –cookie cookies.txt https:
//<ufm-ip>/ufmRestV2/reources/systems
For token-based authentication, follow the below instructions
Create an access token using either the user's credentials or session:
curl -k -X POST https:
//<ufm-ip>/ufmRest/app/tokens -u username:password
Access ufmRestV3 using the access token generated earlier:
curl -k https:
//<ufm-ip>/ufmRest/resources/systems -H "Authorization:Basic <access_token>"