Tanzu Ops Manager API Reference
Parallel Calls
This API does not support parallel API calls.
Any write API calls made to Ops Manager will be queued and executed serially. This could result in unexpected data loss if multiple requests are made to modify the same resource.
How to Authenticate
You must pass a token to each API endpoint. To get a token, and curl an API endpoint using that token, follow these instructions:
Installing uaac
From a command line with Ruby installed, install the cf-uaac gem:
gem install cf-uaac
Obtaining a uaac token
Target your Tanzu Ops Manager IP. You may need to pass the --skip-ssl-validation flag if the opsman certificate is self-signed:
uaac target https://YOUR_OPSMAN_IP/uaa
Log in to your Tanzu Ops Manager with the Client name "opsman" and empty Client secret:
uaac token owner getClient name: opsmanClient secret: JUST_PRESS_ENTERUser name: YOUR_OPSMAN_USERNAME_HEREPassword: YOUR_OPSMAN_PASSWORD_HERE
Using uaac curl
uaac now has your token and you can now use uaac curl:
uaac curl <ENDPOINT>
For example, uaac curl -k /info
You can also use other HTTP methods such as POST, PUT, and DELETE:
uaac curl -X POST -H "Content-type: application/json" <ENDPOINT> -d '<JSON BODY>'
For example, uaac curl -k -X PUT -H "Content-type: application/json" https://om.tas.pivotal.io/api/v0/settings/pruning -d '{"days_to_keep":120}'
Using regular curl
Use uaac context and get the access_token:
curl -H "Authorization: Bearer UAA_ACCESS_TOKEN" <ENDPOINT>
