VMware Cloud Community
vropsuser
Contributor
Contributor

How do you get VLAN information from the VROPs API?

I understand how to talk to the API, I am able to get a token, get VMs and their health.  I am able to get port groups and switches but I can not figure out where the VLAN properties are.  Any pointers will be useful.

/suite-api/api/resources?resourceKind=VmwareDistributedVirtualSwitch

/suite-api/api/resources?resourceKind=DistributedVirtualPortgroup

If I get the statkeys for any of these ids being returned they do not contain a VLAN value, perhaps the key is a different name?

Tags (3)
Reply
0 Kudos
1 Reply
vropsuser
Contributor
Contributor

The answer is loop: suite-api/api/resources?resourceKind=DistributedVirtualPortgroup

Then call suite-api/api/resources/{id}/properties which comes from propertiesOfResource key value from the output of the first call.

Reply
0 Kudos