VMware Cloud Community
r0ck
Enthusiast
Enthusiast

how to export a view over API

Hello

I try to export a custom view that i have created in content -> views over the API.

Its a simple list of all vms with the IO data attached.

Any suggestion or examples how to do this? I cant find a way to point a view with the API.

Using vrops 6.0.3

Thank you

0 Kudos
6 Replies
aaghabekyan
VMware Employee
VMware Employee

Hi

There is a internal API in vROps 6.1 to get ViewDefinition /vRops-IP/internal/viewdefinitions/{id}, but I am not sure it is available in 6.0.3, if not you can use

built-in CLI tools to export a view. 

r0ck
Enthusiast
Enthusiast

Thank you, i will test this.

0 Kudos
cmoser546
Contributor
Contributor

that did not work, got a 404 error (first I got a 403 error, but this was fixed by adding header X-vRealizeOps-API-use-unsupported: true)

My Request:

URL: https://<vrops>/suite-api/internal/viewdefinitions/dedba1d8-27ba-4c62-bc90-394e9726b1d7

Extra Headers: X-vRealizeOps-API-use-unsupported: true

> if not you can use built-in CLI tools to export a view.

can you give me a little hint where to start?

0 Kudos
dtaliafe
Hot Shot
Hot Shot

The command line tool is "ops-cli".

vRealize Operations Manager 6.1 Documentation Center

It's in your vROps install directory under tools/opscli.  Looks like it will allow you to export Views with something like this:

opscli view export view-name

0 Kudos
cmoser546
Contributor
Contributor

this exports only the definition of the view, but we're looking for the actual data

0 Kudos
dtaliafe
Hot Shot
Hot Shot

If you want the data you need to put the view in a report and then run the report.

0 Kudos