Before you can use the Advanced Networking Services API to manage Advanced Networking Services environment, you must know the ID of the target object (such as the edge gateway or distributed firewall) that you are programmatically managing.

1

Log in to vCloud Air as an administrator. See Log in to vCloud Air for information.

2

Create a login session with vCloud Director. See Create a Session for a Virtual Data Center in a Service for information.

Using the vCloud API, query vCloud Director for the ID of the edge gateway or distributed firewall for which you require an ID:

GET https://vcloud.example.com/api/query?type=edgeGateway
GET https://vcloud.example.com/api/query?type=FirewallService
Note

Alternatively, you can use the vCloud API to navigate the vCloud Director Organization and virtual data center to obtain these IDs. After logging in and creating a session, the vCloud Air API returns the VCloudSessionType object.

The VCloudSessionType object represents a reference to a virtual data center on the vCloud instance. The virtual data center reference contains the full URL to the vCloud instance so that you can log in and navigate the Organization corresponding to the VDCReference. The returned virtual data center contains a list of all its gateways.

See also VDC Administration in the vCloud API Programming Guide for information.