I was trying to download a Report via the Aria Operations API recently and noticed a couple things I'd like to share. Let's have a look.
There are a handful of Reports available as PDF and/or CSV.

You can see them via API here.
Looking more closely for the Powered Off VMs Report, you can see the Report and its id.

This id is what you'll use to download the Report via GET /api/reports/{id}/download.

You'll notice I've executed the call and it's given me my Report via the "Download file", clicking that link downloads the Report in PDF format, which is the default.

If you'd like the CSV Report, enter CSV into the format parameter.
And you'll notice the Report has been downloaded in CSV format. I've been making these calls via Google Chrome (also works fine with Safari), but heads-up if you're using Mozilla Firefox, you'll also need to adjust the Response content type to text/csv. I don't think this is by designed, so we've opened an internal bug to review.

All of the curl commands are included above if you'd like to explore via Postman or scripts of your own, enjoy!
Comentários