2.0
Table Of Contents
- VMware vFabric Data Director API Programming Guide
Table 3-1. CRUD Operations Summary (Continued)
HTTP/REST Operation SQL Statement Operation Summary
PUT Update UPDATE Modifies an existing object.
DELETE Delete DELETE Deletes an existing object.
Hostname
The hostname is the network name of the computer running Data Director.
Path
The path is the path to the Data Director API package on your computer or network.
Headers
The Data Director API supports standard HTTP Accept headers as follows:
Content-type: The value of the context-type header is application/xml or application/json, depending on which
request format you use. The content-type header must be used with PUT/POST requests that include a request
body.
Accepts: The value of the Accepts header is application/xml or application/json, depending on which return
format you require. The Accepts header must be used with GET requests that expect a response body in return.
Authorization: HTTP basic authentication (RFC 2617).
Location: Requests that create an object (including all asynchronous requests, which create a task object), return
the created object's URL via this header.
Request Body
The request body includes the parameters of your API call. The parameter options for each call in the vFabric
Data Director API are listed in the VMware vFabric Data Director Call Reference (rest-api2.0.html).
You can retrieve live examples of data object representations in your choice of encoding from a live Data
Director API server by browsing the namespace under http://.../datadirector/api/dataformat.
An example of the XML and JSON elements for the request body of the RoleCreate call is shown below.
XML:
<RoleCreate>
<name>sample</name>
<description>sample</description>
<orgId>1</orgId>
<active>true</active>
</RoleCreate>
JSON:
{
"name" : "sample",
"description" : "sample",
"orgId" : 1,
"active" : true
}
See Chapter 4 of this guide for more examples of call requests.
VMware vFabric Data Director API Programming Guide
14 VMware, Inc.