With the release of “VMware Skyline Advisor Pro”, the Skyline Insights API is made available. Here are the steps you need to perform to have a working environment. Please read the “API Documentation” thoroughly to ensure you know all the steps and options.
NOTE: Please make sure you have also installed “jq” (if you are on a Mac). Else, remove “jq” from commands below.
Enable “API User” role
1 – Select “down arrow” next to your name and select “My Account”
2 – Select “My Roles” and select “Service Roles” (make sure “Skyline API User” has been added to your account).

Generate API Token
1 – In “My Account”, select “API Tokens”
2 – Select “GENERATE A NEW API TOKEN”
3 – Enter name, select “Developer”, and select “Generate”
4 – Save off the API Token, select “COPY”, and select “CONTINUE”

Generate Access Token
Run the following command using your API Token to create your Access Token (result: YOUR-ACCESS-TOKEN)
1 2 3 4 |
curl -s -X POST https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize?grant_type=refresh_token \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode "refresh_token=YOUR-API-TOKEN" | jq -r .access_token |
Test Insight API to get findings
Run the following command to get an example output.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
curl -s -X POST https://skyline.vmware.com/public/api/data -H "Authorization: Bearer YOUR-ACCESS-TOKEN" -H 'Content-Type: application/json' -d '{"query": " { activeFindings( start: 0 limit: 1 orderBy: { field: OBJECTS_COUNT, order: ASC } ) { findings { findingId kbLinkURLs affectedObjects { objects { sourceName objectName } } } } } "}' | jq . } |
That is it. You now have a working environment in order to get Skyline Insight API working. I will provide more examples in the near future.
Comments