- Authenticate to vCenter to get user credential.
# curl -k -X POST https://10.0.0.27/rest/com/vmware/cis/session -u <USERNAME>@<DOMAIN>:<PASSWORD> | jq
{
"value": "SESSIONID"
}
- Save the session id to a variable
# ID=SESSIONID
# curl -k -X POST https://10.0.0.27/rest/com/vmware/cis/session -u <USERNAME>@<DOMAIN>:<PASSWORD> | jq
{
"value": "SESSIONID"
}
# ID=SESSIONID