manual collection can be triggered via API we first need to get a tioken and then invoke API:

token:

curl --location --request POST 'https://<UM_IP>:8443/api/v1/login' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user":"usagemeter",
   "password":"vmware"
}' 

trigger collection:

curl --location --request POST 'https://<um_ip>:8443/api/v1/collect' \
--header 'Content-Type: application/json' \
--header 'sessionid: UmSIDzwOFhFRjBhdXOG6nrEaGJMco10t4im8pJN8kYXFn54E' \
--data-raw '{
  "trigger" : ["All"]
}'

Leave a Reply

Your email address will not be published. Required fields are marked *