VMware Cloud Director API - POST-CreateTask
POST /tasksList/{id}
- Operation:
- POST /tasksList/{id}
- Description:
- Post an external task to this organization.
- Since:
- Input parameters
-
The task to be created.
- Consume media type(s):
-
application/vnd.vmware.vcloud.task+xml
application/vnd.vmware.vcloud.task+json
- Input type:
- TaskType
- Output parameters
-
{@link TaskType} since 2.0
- Produce media type(s):
-
application/vnd.vmware.vcloud.task+xml
application/vnd.vmware.vcloud.task+json
- Output type:
- TaskType
- Examples
-
- Request
-
HTTP 1.1
POST /api/tasksList/7b832bc5-3d65-45a2-8d35-da28388ab80a
Headers:
Content-Length: 792
Content-Type: application/vnd.vmware.vcloud.task+xml; charset=ISO-8859-1
x-vcloud-authorization: SZMKkKToUBmDWSEeqZYL2yxpCqDiyToj5PYW3TigOrI=
Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:Task
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
name="TaskName"
serviceNamespace="ServiceNamespace"
status="error">
<vcloud:Owner
href="https://vcloud.example.com/api/admin/org/7b832bc5-3d65-45a2-8d35-da28388ab80a"
name="Default"
type="application/vnd.vmware.admin.organization+xml"/>
<vcloud:User
href="https://vcloud.example.com/api/admin/user/007a5dfd-32b4-42dd-813b-bfef3da70cb5"
name="User"
type="application/vnd.vmware.admin.user+xml"/>
<vcloud:Organization
href="https://vcloud.example.com/api/org/7b832bc5-3d65-45a2-8d35-da28388ab80a"
name="Default"
type="application/vnd.vmware.vcloud.org+xml"/>
<vcloud:Progress>10</vcloud:Progress>
<vcloud:Details>The task is still in progress.</vcloud:Details>
</vcloud:Task>
- Response
-
HTTP/1.1 200 OK
Headers:
Content-Length: 1490
Content-Type: application/vnd.vmware.vcloud.task+xml;version=5.5
Vary: Accept-Encoding
Body:
<?xml version="1.0" encoding="UTF-8"?><Task
xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
cancelRequested="false"
endTime="2013-02-14T13:12:08.618+02:00"
expiryTime="2013-05-15T13:12:08.618+03:00"
href="https://vcloud.example.com/api/task/de88f868-8402-4a66-aa7b-18a45223d640"
id="urn:vcloud:task:de88f868-8402-4a66-aa7b-18a45223d640"
name="task"
operation="External processing finished Organization Default(7b832bc5-3d65-45a2-8d35-da28388ab80a)"
operationName="jobCustom"
serviceNamespace="ServiceNamespace"
startTime="2013-02-14T13:12:08.618+02:00"
status="error"
type="application/vnd.vmware.vcloud.task+xml"
xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd">
<Owner
href="https://vcloud.example.com/api/admin/org/7b832bc5-3d65-45a2-8d35-da28388ab80a"
name="Default"
type="application/vnd.vmware.admin.organization+xml"/>
<Error
majorErrorCode="500"
message="The task is still in progress."
minorErrorCode="INTERNAL_SERVER_ERROR"
stackTrace="The task is still in progress."/>
<User
href="https://vcloud.example.com/api/admin/user/007a5dfd-32b4-42dd-813b-bfef3da70cb5"
name="user"
type="application/vnd.vmware.admin.user+xml"/>
<Organization
href="https://vcloud.example.com/api/org/7b832bc5-3d65-45a2-8d35-da28388ab80a"
name="Default"
type="application/vnd.vmware.vcloud.org+xml"/>
<Progress>10</Progress>
<Details>The task is still in progress.</Details>
</Task>