VMware Cloud Director API - POST-CreateServiceLink
POST /admin/extension/service/{id}/links
- Operation:
- POST /admin/extension/service/{id}/links
- Description:
- Create service link.
- Since:
- Input parameters
-
Data needed to create ServiceLink.
- Consume media type(s):
-
application/vnd.vmware.admin.serviceLink+xml
application/vnd.vmware.admin.serviceLink+json
- Input type:
- AdminServiceLinkType
- Output parameters
-
{@link AdminServiceLinkType}
- Produce media type(s):
-
application/vnd.vmware.admin.serviceLink+xml
application/vnd.vmware.admin.serviceLink+json
- Output type:
- AdminServiceLinkType
- Examples
-
- Request
-
HTTP 1.1
POST /api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/links
Headers:
Content-Length: 369
Content-Type: application/vnd.vmware.admin.serviceLink+xml; charset=ISO-8859-1
x-vcloud-authorization: SZMKkKToUBmDWSEeqZYL2yxpCqDiyToj5PYW3TigOrI=
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:ServiceLink
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5">
<vmext:LinkHref>{baseUri}/srm/vapp_{resourceId}</vmext:LinkHref>
<vmext:MimeType>MIME</vmext:MimeType>
<vmext:Rel>RELATION</vmext:Rel>
<vmext:ResourceType>application/vnd.vmware.vcloud.vApp+xml</vmext:ResourceType>
</vmext:ServiceLink>
- Response
-
HTTP/1.1 201 Created
Headers:
Content-Length: 1228
Content-Type: application/vnd.vmware.admin.servicelink+xml;version=5.5
Location: https://vcloud.example.com/api/admin/extension/service/link/8ab8598e-81bc-4c08-b976-788707772f11
Vary: Accept-Encoding
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:ServiceLink
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/link/8ab8598e-81bc-4c08-b976-788707772f11"
id="urn:vcloud:serviceLink:8ab8598e-81bc-4c08-b976-788707772f11"
type="application/vnd.vmware.admin.serviceLink+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/link/8ab8598e-81bc-4c08-b976-788707772f11"
rel="remove"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2"
name="NewExtensionService"
rel="up"
type="application/vnd.vmware.admin.service+xml"/>
<vmext:LinkHref>{baseUri}/srm/vapp_{resourceId}</vmext:LinkHref>
<vmext:MimeType>MIME</vmext:MimeType>
<vmext:Rel>RELATION</vmext:Rel>
<vmext:ResourceType>application/vnd.vmware.vcloud.vApp+xml</vmext:ResourceType>
</vmext:ServiceLink>