Skip to content

Instantly share code, notes, and snippets.

View mathse's full-sized avatar
💭
wrangling data

Mathias Decker mathse

💭
wrangling data
View GitHub Profile
@mathse
mathse / vcenter-api.md
Created July 17, 2021 17:56 — forked from kaitoii11/vcenter-api.md
Sample on how to use vCenter API
  • 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