Windspirit
Hot Shot
Hot Shot

vROPS REST : How do I read out a View of a resource

HI all,

accessing REST etc is easily done. But I can not find in the REST docu  (https://developer.vmware.com/apis/vrealize-operations) any point to get VIEWS. 

I like to use vRO to get the data of a view so I can do some fun stuff with it.

Regards

D

Labels (2)
0 Kudos
4 Replies
RobertMesropyan
VMware Employee
VMware Employee

Hi @Windspirit 
In released vRops 8.10 you can use direct GET​/internal​/views​/{id}​/data​/export to obtain views result, or use existing /api/reports API to generate/download reports with desired view. You can recheck both from https://YourvRopsIP/suite-api

Windspirit
Hot Shot
Hot Shot

Thanks that helps a lot.

Reports...l looked at that. However, the issue was that I vRO can do (ATM..as far as I know) a binary download and the Download Plugin can not (ATM..I asked for it) take Headers (authorization token). So I was looking at running a CMD command on shell instead.

I do hope I can get to the views data as JSON..I will give it a test.

regards

Daniel

0 Kudos
Windspirit
Hot Shot
Hot Shot

(something is wrong with the communities...this is the third time I'm typing this)

The URLs given do not work, and neither are they in the Swagger. 

0 Kudos
Windspirit
Hot Shot
Hot Shot

OK...so here is a "solution"....its not brilliant but works:

  • in vRO controlcenter, enable local execution
  • get the AuthKey from vROPS
  • write the curl command for downloading into a local file on /var/run/vco
  • make file executable 775
  • execute file
  • get return
  • delete temp file

That way you can get a CSV Sting from the report into vRO