4. Networking Examples : 4.5 VXLAN ORG Network for Disaster Recovery : 4.5.4 Updated vCloud DR Recovery Process : 4.5.4.2. Enable predefined services configurations for recovery site
   
4.5.4.2. Enable predefined services configurations for recovery site
The following high-level example procedure uses the vCloud Director API to get information about the vCloud Networking and Security Edge Gateway (Edge Gateway ) devices, modify that information, and update the device configuration.
To use the vCloud Director API to get and modify information for the Edge Gateway devices
1. Authenticate to vCloud Director (Section 4.5.4.4).
2. Get and return the Edge Gateway devices (Section 4.5.4.5).
3. Get and return the specific Edge Gateway device current configuration (Section 4.5.4.6).
4. Modify the XML to reflect the new configuration (Section 0).
5. Update the Edge Gateway device configuration (Section 4.5.4.8).
For illustration, the example updates a given Edge Gateway device to change the HA status. In a full recovery scenario, all configuration elements can be updated by editing or adding the correct section in the XML document that represents the Edge Gateway service configuration.
After you have successfully implemented your vCloud DR solution, you can look at how to use and implement this solution using the vCloud API. This section of the document introduces you to the VMware vCloud™ API and, in particular, the Edge Gateway API and Query Service API.
The vCloud API uses HTTP requests (which are often executed by a script or other higherlevel language) as a way of making what are essentially remote procedure calls that create, modify, or delete the objects defined by the API. This vCloud REST API is defined by a collection of XML documents that represent the objects on which the API operates. The operations themselves (HTTP requests) are generic to all HTTP clients.
The vCloud REST API work flows fall into a pattern that includes only two fundamental operations:
Make an HTTP request (typically GET, PUT, POST, or DELETE). The target of this request is either a wellknown URL (such as the vCloud Director URL) or a link obtained from the response to a previous request.
Examine the response, which can be an XML document or an HTTP response code.
*If the response is an XML document, it can contain links or other information about the state of an object.
*If the response is an HTTP response code, it indicates whether the request succeeded or failed, and can be accompanied by a URL that points to a location from which additional information can be retrieved.