In this example, we will perform an HTTP GET REST API request via cURL script:
- To check whether cURL is available in the operating system, use the curl ---version command.
- Run the following cURL script:
curl -k -X GET -H "Accept: application/xml" -H "Content-Type: application/xml" -u admin:VMware1! 'https://nsxmgr-01a.corp.local/api/2.0/services/usermgmt/user/admin'
Here is an example output of the preceding command:
The credentials can also be input as a header, similar to Postman, with the following command:
curl -k -X GET -H "Accept: application/xml" -H "Content-Type: application/xml" -H "Authorization: ...