GET /tasks/{job_list}
Use this method to return information about one or more jobs (tasks) and their subtasks.
For message-description and user-action text in the job summary, you can specify the text directly in the request body if no translations are needed, or you can reference the text from a translated bundle file (for example, com.lenovo.lxca.server.jobs.bundle.jobsSummary).
Attribute | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
format | Required | Array of strings | List of formats for the text. This can be one of the following values.
If no format is needed, use an empty array. | ||
link | Optional | String | URL to be linked to | ||
text | Required | String or array of strings | Text to be formatted |
[{
"text": "To display the text correctly, the following steps are made.",
"format": []
},
{
"text": [],
"format": ["newline"]
},
{
"text": [{
"text": "Segment the text into pieces between HTML tags.",
"format": ["listElement"]
},
{
"text": [{
"text": "If the segmented text contains ",
"format": []
},
{
"text": "multiple tags",
"format": ["bold"]
},
{
"text": ", segment them as well.",
"format": []
}],
"format": ["listElement"]
},
{
"text": [ {
"text": "After having all segments, add the tags as follows:",
"format": []
},
{
"text": [{
"text": "Add the text between the tags in the text field of JSON. If multiple tags are found,
text field is an array of JSON Objects.",
"format": ["listElement"]
},
{
"text": "Add the format for each text between tags.",
"format": ["listElement"]
}],
"format": ["bulletList"]
}],
"format": ["listElement"]
},
{
"text": "Make sure this is a json format.",
"format": ["listElement", "bold", "underline"]
}],
"format": ["orderedList"]
},
{
"text": [],
"format": ["newline"]
},
{
"text": [{
"text": "This is how a paragraph looks like with a ",
"format": []
},
{
"text": "link",
"format": ["link"],
"link": "https://www3.lenovo.com/"
}],
"format": ["paragraph"]
},
{
"text": "This is how the result should look.",
"format": ["paragraph", "italic"]
}]
To display the text correctly, the following steps are made.
<br></br>
<ol>
<li>Segment the text into pieces between HTML tags.</li>
<li>If the segmented text contains <b>multiple tags</b>, segment them as well.</li>
<li>After having all segments, add the tags as follows:
<ul>
<li>Add the text between the tags in the text field of JSON. If multiple tags are found,
text field is an array of JSON Objects.</li>
<li>Add the format for each text between tags.</li>
</ul></li>
<li><b><u>Make sure this is a json format.</u></b></li>
</ol>
<br></br>
<p>This is how a paragraph looks like with a <a href="https://www3.lenovo.com/">link</a></p>
<p><i>This is how the result should look.</i></p>
Authentication
Authentication with username and password is required.
Request URL
GET https://{management_server_IP}/tasks/{job_list}
where <job_list} is a list of one or more job IDs, separated by a comma (for example, 10,11,12). To obtain the job IDs, use the GET /tasks method.
Specify a job ID is optional. If a job ID is not specified, information about all jobs and their subtasks is returned.
Query parameters
Parameters | Required / Optional | Description |
---|---|---|
includeLogs={boolean} | Optional | Indicates whether to return job log. This can be one of the following values:
|
compact={boolean} | Optional | Indicates whether to return information about each subtask in the job. This can be one of the following values:
|
GET https://192.0.2.0 /tasks/52,69,86,103?includeChildren=true
Request body
None
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
400 | Bad Request | A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body. |
401 | Unauthorized | The user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body. |
403 | Forbidden | The orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request. |
404 | Not found | A specified resource cannot be found. A descriptive error message is returned in the response body. |
409 | Conflict | There is a conflict with the current state of the resource. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
Attributes | Type | Description | |||
---|---|---|---|---|---|
children | Array of objects | Information about each subtask in the job | |||
children | Array of objects | Information about each subtask in the subtask. The properties in this object are the same as the top-level children object. | |||
complete | String | Date and time that the subtask was completed | |||
create | String | Date and time that the subtask was created | |||
createdBy | String | User name that created the subtask | |||
filterStatusKey | String | This can be one of the following values.
| |||
hasNotes | Boolean | Indicates whether the subtask has notes. This can be one of the following values.
| |||
hasNotesString | Boolean | Indicates whether the subtask has notes. This can be one of the following values.
| |||
hidden | Boolean | Indicates whether the alert is hidden in the web interface. This can be one of the following values.
| |||
isDeletable | Boolean | Indicates whether the subtask can be deleted. This can be one of the following values.
| |||
isStoppable | Boolean | Indicates whether the subtask can be stopped. This can be one of the following values.
| |||
jobCategory | String | Subtask category. This can be one of the following values.
| |||
jobCategoryKey | String | Subtask category key. This can be one of the following values.
| |||
jobTitle | String | ||||
jobUID | String | Subtask UUID | |||
noteAdd | Boolean | Identifies whether notes can be added to this subtask. This can be one of the following values:
| |||
percentage | Integer | Percentage complete of the subtask. This can be an integer from 0 - 100. | |||
start | Date | Date and time that the subtask started | |||
stateIconKey | String | Status icon. This can be one of the following values.
| |||
status | String | State of the subtask. This can be one of the following values.
| |||
stoppableString | String | Indicates whether the subtask can be stopped. This can be one of the following values.
| |||
stoppedBy | String | User name that canceled the subtask | |||
summary | Object | Information about the subtask summary. | |||
severity | String | Severity of the subtask. This can be one of the following values.
| |||
severityText | String | Severity of the job. This can be one of the following values.
| |||
summaryAction | Array of objects | Information about the recovery actions | |||
format | Array of strings | ||||
text | String | Recovery actions to resolve the subtask | |||
summaryDescription | String | Short descriptions of the subtask | |||
target | String | Name of the group or device that is the target for the subtask or Not Available | |||
targetUUID | String | UUID of the group or device that is the target for the subtask | |||
translatedStatus | String | Translated state of the subtask. This can be one of the following values.
| |||
complete | String | Date and time that the subtask was completed | |||
create | String | Date and time that the subtask was created | |||
createdBy | String | User name that created the subtask | |||
filterStatusKey | String | This can be one of the following values.
| |||
hasNotes | Boolean | Indicates whether the job has notes. This can be one of the following values.
| |||
hasNotesString | String | Indicates whether the job has notes. This can be one of the following values.
| |||
hidden | Boolean | Indicates whether the alert is hidden in the web interface. This can be one of the following values.
| |||
isDeletable | Boolean | Indicates whether the subtask can be deleted. This can be one of the following values.
| |||
isStoppable | Boolean | Indicates whether the subtask can be stopped. This can be one of the following values.
| |||
jobCategory | String | Subtask category. This can be one of the following values.
| |||
jobCategoryKey | String | Subtask category key. This can be one of the following values.
| |||
jobTitle | String | ||||
jobUID | String | Subtask UUID | |||
noteAdd | Boolean | Identifies whether notes can be added to this job. This can be one of the following values.
| |||
percentage | Integer | Percentage complete of the subtask. This can be an integer from 0 - 100. | |||
scheduleId | String | (Scheduled jobs only) ID of the schedule that started the job | |||
scheduleType | String | (Scheduled jobs only) Type of schedule. This can be one of the following values.
| |||
start | String | Date and time that the subtask started | |||
stateIconKey | Date | Status icon. This can be one of the following values.
| |||
status | String | State of the job. This can be one of the following values.
| |||
stoppableString | String | Indicates whether this job can be stopped. This can be one of the following values.
| |||
stoppedBy | String | User name that canceled the job | |||
summary | Object | Information about the job summary | |||
severity | String | Severity of the job. This can be one of the following values.
| |||
severityText | String | Severity of the job. This can be one of the following values.
| |||
summaryAction | Array of objects | Information about the recovery actions | |||
format | Array of strings | ||||
text | String | Recovery actions to resolve the job | |||
summaryDescription | String | Short descriptions of the job | |||
target | String | Name of the group or device that is the target for the subtask or Not Available | |||
targetUUID | String | UUID of the group or device that is the target for the subtask | |||
translatedStatus | String | Translated job status. This can be one of the following values.
|
[{
"children": [{
"children": [],
"complete": "2019-02-26T16:52:55Z",
"create": "2019-02-26T16:52:54Z",
"createdBy": "ADMIN",
"filterStatusKey": "Complete",
"hidden": false,
"isDeletable": true,
"isStoppable": false,
"jobCategory": "Management",
"jobCategoryKey": "Management",
"jobTitle": "Verifying network connectivity.",
"jobUID": "18",
"noteAdd": true,
"percentage": 100,
"start": "2019-02-26T16:52:55Z",
"stateIconKey": "Complete",
"status": "Complete",
"stoppableString": "No",
"stoppedBy": "",
"summary": null,
"target": "Not Available",
"targetUUID": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"translatedStatus": "Complete"
},
...,
{
"children": [],
"complete": "2019-02-26T16:52:58Z",
"create": "2019-02-26T16:52:54Z",
"createdBy": "ADMIN",
"filterStatusKey": "Complete",
"hidden": false,
"isDeletable": true,
"isStoppable": false,
"jobCategory": "Management",
"jobCategoryKey": "Management",
"jobTitle": "UnManaging the server is complete",
"jobUID": "11",
"noteAdd": true,
"percentage": 100,
"start": "2019-02-26T16:52:57Z",
"stateIconKey": "Complete",
"status": "Complete",
"stoppableString": "No",
"stoppedBy": "",
"summary": null,
"target": "Not Available",
"targetUUID": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"translatedStatus": "Complete"
}],
"complete": "2019-02-26T16:52:58Z",
"create": "2019-02-26T16:52:54Z",
"createdBy": "ADMIN",
"filterStatusKey": "Complete",
"hasNotes": false,
"hasNotesString": "No",
"hidden": false,
"isDeletable": true,
"isStoppable": false,
"jobCategory": "Management",
"jobCategoryKey": "Management",
"jobTitle": "Unmanage job for 169.254.1.23",
"jobUID": "10",
"noteAdd": true,
"percentage": 100,
"start": "2019-02-26T16:52:55Z",
"stateIconKey": "Complete",
"status": "Complete",
"stoppableString": "No",
"stoppedBy": "",
"summary": {
"severity": "Informational",
"severityText": "Informational",
"summaryAction": [{
"format": [],
"text": ""
}],
"summaryDescription": "The request to unmanage the server was successful."
},
"target": "Not Available",
"targetUUID": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"translatedStatus": "Complete"
}]