5.5

Table Of Contents
Response:
201 Created
Content-Type: application/vnd.vmware.admin.resourceClass+xml
...
<vmext:ApiFilter>
<vmext:UrlPattern>(/api/org/.*/backups)|(/api/vApp/vapp-.*/backups)|
(/api/vApp/vapp-.*/action/backup)|(/api/backup/.*) |
(/api/vApp/vapp-.*/action/recoverBackup)</vmext:UrlPattern>
</vmext:ApiFilter>
Create or Update an Extension Service API Definition
You can define an API for an extension service when you register the service. You can also create or update
the service API definition later.
An API definition for an extension service includes an API entry point (A URL at which a client can send
requests to the API) and a set of file descriptors, each of which consists of a description and a reference to a
schema definition file.
An ApiDefinition element must contain the following child elements:
EntryPoint
The URL to which a client can send requests to the service API. This can be
any URL, and can include the variable {baseUri}, which represents the
vCloud Director REST API base URL.
Namespace
The service namespace. See “Register an Extension Service,” on page 332
Files
One or more references to schema definition files. The references must be
accessible to vCloud Director.
Prerequisites
Verify that you are logged in to the vCloud API as a system administrator.
Procedure
1 Retrieve the XML representation of the service.
Use a request like this one:
GET https://vcloud.example.com/api/admin/extension/service/45
2 Examine the response to find the Link for adding API definitions.
This Link has the following form:
<vcloud:Link
rel="add"
type="application/vnd.vmware.admin.apiDefinition+xml"
href="https://vcloud.example.com/api/admin/extension/service/45/apidefinitions" />
3 Construct an ApiDefinition element.
For information about the contents of this element, see the request portion of “Example: Create an
Extension Service API Definition,” on page 356.
4 POST the ApiDefinition element to the URL described in Step 2.
Chapter 11 vCloud Director Extension Services
VMware, Inc. 355