API
task
URI
http://<server>:<port>/imanager/cloud/web/tasks/{id}[.<format>]
Supported Methods
GET
Introduction
Queries the resource of a specified task information.
Supported methods:
- GET: Gets the specified task information.
Supported representation format: JSON.
HTTP Request Method
An HTTP request is performed on the following URI. Here we take JSON output format for illustration, where supermapimanager
is the server name.
http://supermapimanager:8390/imanager/cloud/web/tasks/{id}.json
GET Request
Gets the specified task information.
Request Parameters
Name | Type | Definition |
---|---|---|
id | String | [Required] Request result id. For example, the id of the task returned by the environment. |
Response Structure
Performs a GET request on a task resource. The task information returned consists of the following fields:
Field | Type | Description |
---|---|---|
description | LocaleMessage | Task description. |
id | String | Task id. |
status | TransactionStatus | Task status, including DONE (completed), ERROR (Error), PENDING (not completed), CANCELLING (being canceling), CANCELLED (has been canceled). |
steps | TransactionStep[] | Task step information. |
timelineId | long | Time line id of the task implementation. |
Where TransactionStep indicates the task step information, which is composed of the following fields:
Field | Type | Description |
---|---|---|
description | LocaleMessage | Step description. |
contents | TransactionStepContent[] | Step content information. |
startTime | Calendar | Step start time. |
costTime | long | Time cost by task steps. The unit is milliseconds. |
Where TransactionStepContent indicates the task step content information, which is composed of the following fields:
Field | Type | Description |
---|---|---|
isProgressAvailable | boolean | Whether the progress is available. |
message | LocaleMessage | Step content description. |
progress | float | Progress value. |
status | StepStatus | Step content status, including WAITING (waiting for preparation), DONE (completed), ERROR (Error), PENDING (not completed), CANCELLING (being canceling), CANCELLED (has been canceled). |
Response Example
Gets a specified task information, that is, performs a GET request on a task resource as follows:
http://localhost:8390/imanager/cloud/web/tasks/690.json
The returned json format response is as follows:
{
"description": "Create 1 GIS server: GIS server",
"id": "690",
"status": "DONE",
"steps": [
{
"contents": [
{
"isProgressAvailable": true,
"message": "Virtual machine sm_iserver-69 created",
"progress": 100,
"status": "DONE"
}
],
"costTime": 460000,
"description": "Create virtual machine",
"startTime": {
"dayOfWeek": 3,
"month": 12,
"hour": 11,
"year": 2016,
"day": 13,
"minute": 12,
"second": 46
}
},
{
"contents": [
{
"isProgressAvailable": true,
"message": "IP192.168.22.69 check successful" ,
"progress": 100,
"status": "DONE"
}
],
"costTime": 123000,
"description": "Check IP",
"startTime": {
"dayOfWeek": 3,
"month": 12,
"hour": 11,
"year": 2016,
"day": 13,
"minute": 17,
"second": 6
}
},
{
"contents": [
{
"isProgressAvailable": true,
"message": "Set additional information successfully",
"progress": 100,
"status": "DONE"
}
],
"costTime": 2000,
"description": "Set additional information",
"startTime": {
"dayOfWeek": 3,
"month": 12,
"hour": 11,
"year": 2016,
"day": 13,
"minute": 18,
"second": 29
}
}
],
"timelineId": 7
}