Adapter Instances, Reports, and more, you can access all of these via the Aria Operations API. But, did you know there is also an Internal API?! This is how we'll access Views, let's have a look!
Access your Operations API URL at https:your_ops_fqdn_here/suite-api and top right Select a definition dropdown, select Internal APIs. As you can see, there are several different endpoints here, including Views.
When accessing this endpoint, there are three required fields:
X-Ops-API-use-unsupported: acknowledges that this Internal API endpoint is unsupported
id: View definition id, which you can get from a View export
resourceId: id of object against which the View is defined, you can get this from Inventory
Let's run one against a VM View, this View list details of VMs in our environment.
To get the id of this View, export it, extract the ZIP, open the XML and find the ViewDef id field.
This is the id we'll use in our call. Next we need a resourceId, this is the id/UUID of the object against which the View is defined, in this case vSphere World. Find the id of vSphere World via Inventory.
This is the resourceId we'll use in our call, which looks like this.
Click Execute to run the GET /internal/views/bbac4295-7ae5-4b74-a27f-fe1be687fe33/data/export, with a corresponding cURL command:
curl -X GET "https://vr83-bpeterson.tvs.vmware.com/suite-api/internal/views/bbac4295-7ae5-4b74-a27f-fe1be687fe33/data/export?page=0&pageSize=1000&resourceId=86c38933-5e4d-4795-be43-e8dfc4e162b9&_no_links=true" -H "accept: application/json" -H "X-Ops-API-use-unsupported: true" -H "Authorization: OpsToken 287ed085-c6ca-4255-b69c-956f1665ed51::e0b5ace5-223f-4859-91a5-070d02caf354"
The Response body will include a link to Download file.
This is your JSON output, do with it what you will. The Operations Internal APIs can be powerful, but keep in mind they are unsupported/undocumented and subject to change at anytime. Good luck!
Commentaires