Using the Advanced Networking Services API, you can create an application and then define rules for that application. Additionally, you can update and delete applications by using the API.

You can create custom applications by using the Advanced Networking Services API so that you can define applications to use non-standard ports. You can modify the name, description, protocol, or port value of an application.

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.

1

To get the details about the applications configured for an edge gateway, issue the following request:

GET https://vchs.vmware.com/hybridity/api/scope/scopeId/applications/[applicationId]

In the request header, include the OATH token and the Accept header that you obtained when creating a login session:

Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "vcloud-auth-token"

If the request is successful, the server returns HTTP response code 200 and the details of the application configuration.

2

To create an application, submit a POST request using the following request header:

POST https://vchs.vmware.com/hybridity/api/scope/scopeId/applications

In the request header, include the OATH token and the Accept header that you obtained when creating a login session:

Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: vcloud-auth-token

Include the following elements in the request body:

{
  "objectId": "string",
  "revision": number,
  "name": "string",
  "description": "string",
  "scope" : [ {
      "id" : "string",
      "name" : "string",
      "objectType" : "string",
    }, ]
  "elements" : [ {
      "applicationProtocol" : "string",
      "value" : "string",
      "sourcePort" : "string"
    }, ]
}

For a description of each element, see Schema for Applications and Application Groups.

3

To delete an application, issue the following DELETE request. (Include the application ID you obtained in the previous step.)

DELETE https://vchs.vmware.com/hybridity/api/scope/scopeId/applications/applicationId

In the request header, include the OATH token and the Accept header that you obtained when creating a login session.

The server returns status 204 NO CONTENT in the response header. The server does not return a response body.

Add the application to the configuration for an application group.