VMware Cloud Director API - POST-CreateService
POST /admin/extension/service
- Operation:
- POST /admin/extension/service
- Description:
- Creates service.
- Since:
- 5.1
- Deprecated:
- 39.0
- Input parameters
-
Params needed to create {@link AdminServiceType}
- Consume media type(s):
-
application/vnd.vmware.admin.service+xml
application/vnd.vmware.admin.service+json
- Input type:
- AdminServiceType
- Output parameters
-
the newly created {@link AdminServiceType}
- Produce media type(s):
-
application/vnd.vmware.admin.service+xml
application/vnd.vmware.admin.service+json
- Output type:
- AdminServiceType
- Examples
-
- Request
-
HTTP 1.1
POST /api/admin/extension/service
Headers:
Content-Length: 1944
Content-Type: application/vnd.vmware.admin.service+xml; charset=ISO-8859-1
x-vcloud-authorization: SZMKkKToUBmDWSEeqZYL2yxpCqDiyToj5PYW3TigOrI=
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:Service
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
name="NewExtensionService">
<vmext:Namespace>ServiceNamespace</vmext:Namespace>
<vmext:Enabled>true</vmext:Enabled>
<vmext:AuthorizationEnabled>true</vmext:AuthorizationEnabled>
<vmext:RoutingKey>RoutingKey</vmext:RoutingKey>
<vmext:Priority>10</vmext:Priority>
<vmext:Exchange>exchange4</vmext:Exchange>
<vmext:ServiceLinks>
<vmext:ServiceLink>
<vmext:LinkHref>http://myorg/srm/vapp</vmext:LinkHref>
<vmext:MimeType>MimeType</vmext:MimeType>
<vmext:Rel>linkRel</vmext:Rel>
<vmext:ResourceType>application/vnd.vmware.admin.organization+xml</vmext:ResourceType>
<vmext:ResourceId>7b832bc5-3d65-45a2-8d35-da28388ab80a</vmext:ResourceId>
</vmext:ServiceLink>
</vmext:ServiceLinks>
<vmext:ApiDefinitions>
<vmext:ApiDefinition
name="loadBalancerApi">
<vcloud:Description>Api Definition</vcloud:Description>
<vmext:EntryPoint>{baseUri}/loadBalancer</vmext:EntryPoint>
<vmext:Namespace>com.myCompany.loadBalancer</vmext:Namespace>
<vmext:ApiVendor>Load Balancer API Vendor</vmext:ApiVendor>
<vmext:SupportedApiVersions>
<vmext:Version>100</vmext:Version>
<vmext:Version>1001</vmext:Version>
</vmext:SupportedApiVersions>
<vmext:Files>
<vmext:FileDescriptor>
<vmext:Description>Load balancer API descriptors archive</vmext:Description>
<vmext:File
href="{baseUri}/loadBalancerDescriptors/descriptors.zip"
name="descriptorsArchive"
type="application/zip"/>
</vmext:FileDescriptor>
</vmext:Files>
</vmext:ApiDefinition>
</vmext:ApiDefinitions>
</vmext:Service>
- Response
-
HTTP/1.1 201 Created
Headers:
Content-Length: 3473
Content-Type: application/vnd.vmware.admin.service+xml;version=5.5
Location: https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2
Vary: Accept-Encoding
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:Service
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2"
id="urn:vcloud:externalService:15eacf4c-b4d0-4dba-9c65-7977a9a10ba2"
name="NewExtensionService"
type="application/vnd.vmware.admin.service+xml"
xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1.5 http://https://vcloud.example.com/api/v1.5/schema/vmwextensions.xsd http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd">
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2"
rel="remove"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2"
rel="edit"
type="application/vnd.vmware.admin.service+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/rights"
rel="rights"
type="application/vnd.vmware.admin.rights+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/links"
rel="down:serviceLinks"
type="application/vnd.vmware.vcloud.query.records+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/localizationbundles"
rel="bundle:upload"
type="application/vnd.vmware.admin.bundleUploadParams+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/links"
rel="add"
type="application/vnd.vmware.admin.serviceLink+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/apifilters"
rel="down:apiFilters"
type="application/vnd.vmware.vcloud.query.records+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/apifilters"
rel="add"
type="application/vnd.vmware.admin.apiFilter+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/apidefinitions"
rel="add"
type="application/vnd.vmware.admin.apiDefinition+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/apidefinitions"
rel="down:apiDefinitions"
type="application/vnd.vmware.vcloud.query.records+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/resourceclasses"
rel="add"
type="application/vnd.vmware.admin.resourceClass+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/resourceclasses"
rel="down:resourceClasses"
type="application/vnd.vmware.vcloud.query.records+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/authorizationcheck"
rel="authorization:check"
type="application/vnd.vmware.admin.authorizationCheckParams+xml"/>
<vmext:Namespace>ServiceNamespace</vmext:Namespace>
<vmext:Enabled>true</vmext:Enabled>
<vmext:AuthorizationEnabled>true</vmext:AuthorizationEnabled>
<vmext:RoutingKey>RoutingKey</vmext:RoutingKey>
<vmext:Priority>10</vmext:Priority>
<vmext:Exchange>exchange4</vmext:Exchange>
</vmext:Service>