You can use the vCloud Director API for NSX to create and manage IP address groups and MAC address groups in an organization virtual data center.

API-URL is a URL of the form https://vcloud.example.com/network.

id is a vCloud Director unique identifier in the form of a UUID, as defined by RFC 4122.

# is a small integer used in an NSX object identifier.

See Example: Get an IP Set in an Organization VDC.

Summary of NSX IP and MAC Sets Requests

Operation

Request

Request Body

Response

Create an IP set in the organization VDC with identifier id.

POST API-URL/services/ipset/id

ipset

None

Retrieve all IP sets defined in the organization VDC with identifier id.

GET API-URL/services/ipset/scope/id

None

list

Get the IP set with identifier # defined in the organization VDC with identifier id.

GET API-URL/services/ipset/id:ipset-#

None

ipset

Update the IP set with identifier # defined in the organization VDC with identifier id.

PUT API-URL/services/ipset/id:ipset-#

ipset

None

Delete the IP set with identifier # defined in the organization VDC with identifier id.

DELETE API-URL/services/ipset/id:ipset-#

None

None

Create a MAC set in the organization VDC with identifier id.

POST API-URL/services/macset/id

macset

None

Retrieve all MAC sets defined in the organization VDC with identifier id.

GET API-URL/services/macset/scope/id

None

list

Get the MAC set with identifier # defined in the organization VDC with identifier id.

GET API-URL/services/macset/id:macset-#

None

macset

Update the MAC set with identifier # defined in the organization VDC with identifier id.

PUT API-URL/services/macset/id:macset-#

macset

None

Delete the MAC set with identifier # defined in the organization VDC with identifier id.

DELETE API-URL/services/macset/id:macset-#

None

None

To get the IP set with identifier 2 defined in the organization VDC with identifier 78229ccd-2bf2-466d-8444-03d0bb46caaf, use the following request:

GET https://vcloud.example.com/network/services/ipset/78229ccd-2bf2-466d-8444-03d0bb46caaf:ipset-2