Using Curl with the VMware Cloud on AWS API

Sometimes the initial steps of working with a new API can be hard, often working out how to authenticate and call the APIs can be the hardest part.

I have found that if I break it down into industry standard tooling I can often get a better understanding of how to form this in other languages which I use.

For REST other than calling the API through an API Explorer (like the awesome API explorer built into the VMware Cloud on AWS console) clearly curl is the easiest and probably best industry standard way to test a REST based API.

With this in mind I wanted to show an example of how to use the VMware Cloud on AWS API using CURL, the below example shows how to exchange your refresh token (obtainable from your account) for an access token and then use this to work with all the subsequent APIs in VMware Cloud on AWS or as my example shows, listing the organizations I have access to.

You can download this sample from here.