Skip to main content

GET /tasks

Use this method to return information about all 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).

When the job description and recovery actions require formatted text, you must specify the text as an array of objects in JSON format. You cannot use HTML.
Tip
In the translated bundle files, braces {} must be escaped by a single quote for help text (for example, '{').
AttributeRequired / OptionalTypeDescription
formatRequiredArray of stringsList of formats for the text. This can be one of the following values.
  • bold. Corresponds to the <b> HTML tag.
  • italic. Corresponds to the <i> HTML tag.
  • underline. Corresponds to the <u> HTML tag.
  • link. Corresponds to the <a> HTML tag.
  • newline. Corresponds to the <br> HTML tag.
  • paragraph. Corresponds to the <p> HTML tag.
  • quotation. Corresponds to the <q> HTML tag.
  • orderedList. Corresponds to the <ol> HTML tag.
  • bulletList. Corresponds to the <ul> HTML tag.
  • listElement. Corresponds to the <li> HTML tag.

If no format is needed, use an empty array.

linkOptionalStringURL to be linked to
textRequiredString or array of stringsText to be formatted
The following example has formatted text in the user action. It includes paragraphs, ordered list, unordered list, link, and formatted text. Note that braces {} are not escaped by a single quote.
[{ 
"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"]
}]
This example correlates to the following HTML format
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>
This example correlates to the following formatted output:

Illustrates current alerts that are listed in the Alerts page.

Authentication

Authentication with username and password is required.

Request URL

GET https://{management_server_IP}/tasks

Query parameters

ParametersRequired / OptionalDescription
uuid={uuids}OptionalReturns task information only for one or more specific groups and devices

To obtain the group or device UUIDs, use GET /resourceGroups, GET /chassis, GET /cmms, GET /nodes, GET /storage, and GET /switches.

compact={Boolean}OptionalIndicates whether to return information about each subtask in the job. This can be one of the following values.
  • true. Does not return information about subtasks.

  • false. (default) Returns information about subtasks.

The following example returns information for tasks that are associated with two specific devices.
GET https://192.0.2.0/tasks?uuid=["AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"]

Request body

None

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
400Bad RequestA 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.
401UnauthorizedThe user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body.
403ForbiddenThe 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.
404Not foundA specified resource cannot be found. A descriptive error message is returned in the response body.
409ConflictThere is a conflict with the current state of the resource. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

AttributesTypeDescription
childrenArray of objectsInformation about each subtask in the job
 childrenArray of objectsInformation about each subtask in the subtask. The properties in this object are the same as the top-level children object.
 completeStringDate and time that the subtask was completed
 createStringDate and time that the subtask was created
 createdByStringUser name that created the subtask
 filterStatusKeyStringThis can be one of the following values.
  • Complete
  • Error
 hasNotesBooleanIndicates whether the subtask has notes. This can be one of the following values.
  • true. The job has notes.
  • false. The job does not have notes.
 hasNotesStringBooleanIndicates whether the subtask has notes. This can be one of the following values.
  • yes. The job has notes.
  • no. The job does not have notes.
 hiddenBooleanIndicates whether the alert is hidden in the web interface. This can be one of the following values.
  • true. The alert is not displayed in the web interface.

  • false. (default) The alert is displayed in the web interface.

 isDeletableBooleanIndicates whether the subtask can be deleted. This can be one of the following values.
  • true. The subtask can be deleted.

  • false. The subtask cannot be deleted.

 isStoppableBooleanIndicates whether the subtask can be stopped. This can be one of the following values.
  • true. The subtask can be stopped.

  • false. The subtask cannot be stopped.

 jobCategoryStringSubtask category. This can be one of the following values.
  • Backup
  • Configuration
  • Custom
  • Firmware
  • Health
  • Inventory
  • Management
  • OsDeployment
  • OsDriverUpdates
  • OsImport
  • OsProfileExport
  • Power
  • RemoteAccess
  • SelfMaintenance
  • Service
  • SwitchConfiguration
  • SystemID
  • Unknown
 jobCategoryKeyStringSubtask category key. This can be one of the following values.
  • Backup
  • Configuration
  • Custom
  • Firmware
  • Health
  • Inventory
  • Management
  • OsDeployment
  • OsDriverUpdates
  • OsImport
  • OsProfileExport
  • Power
  • RemoteAccess
  • SelfMaintenance
  • Service
  • SwitchConfiguration
  • SystemID
  • Unknown
 jobTitleString 
 jobUIDStringSubtask UUID
 noteAddBooleanIdentifies whether notes can be added to this subtask. This can be one of the following values:
  • true. Notes can be added to this job
  • false. Notes cannot be added to this job
 percentageIntegerPercentage complete of the subtask. This can be an integer from 0 - 100.
 startDateDate and time that the subtask started
 stateIconKeyStringStatus icon. This can be one of the following values.
  • BlueComplete Informational icon
  • Complete Completed jobs icon
  • Error Critical status icon
  • Investigating Investigating icon
  • Running Running jobs icon
  • Spinning Running jobs icon
  • Stopped Critical status icon
  • Warning Warning status icon
 statusStringState of the subtask. This can be one of the following values.
  • Aborted
  • Blocked
  • Cancelled
  • CancelledWithError
  • CancelledWithWarning
  • Cancelling
  • Complete
  • CompleteWithError
  • CompleteWithWarning
  • Expired
  • Initializing
  • Interrupted
  • InterruptedWithError
  • InterruptedWithWarning
  • Investigating
  • Pending
  • Resolved
  • Running
  • RunningWithError
  • RunningWithWarning
  • Skipped
  • Stopped
  • StoppedWithError
  • StoppedWithWarning
  • Unknown
  • Uploading
  • Validating
  • Waiting
 stoppableStringStringIndicates whether the subtask can be stopped. This can be one of the following values.
  • yes

  • no

 stoppedByStringUser name that canceled the subtask
 summaryObjectInformation about the subtask summary.
  severityStringSeverity of the subtask. This can be one of the following values.
  • Informational. The request started or ended successfully.
  • Warning. The request completed, but there are some problems that you must be aware of . You can decide if action is needed.
  • Critical. The request failed. Action is needed now and the scope is broad (perhaps an imminent outage to a critical resource will result).
  severityTextStringSeverity of the job. This can be one of the following values.
  • Informational. The request started or ended successfully.
  • Warning. The request completed, but there are some problems that you must be aware of . You can decide if action is needed.
  • Critical. The request failed. Action is needed now and the scope is broad (perhaps an imminent outage to a critical resource will result).
  summaryActionArray of objectsInformation about the recovery actions
   formatArray of strings 
   textStringRecovery actions to resolve the subtask
  summaryDescriptionStringShort descriptions of the subtask
 targetStringName of the group or device that is the target for the subtask or Not Available
 targetUUIDStringUUID of the group or device that is the target for the subtask
 translatedStatusStringTranslated state of the subtask. This can be one of the following values.
  • Aborted
  • Blocked
  • Cancelled
  • Cancelled With Error
  • Cancelled With Warning
  • Cancelling
  • Complete
  • Complete With Errors
  • Complete With Warning
  • Expired
  • Initializing
  • Interrupted
  • Interrupted With Error
  • Interrupted With Warning
  • Investigating
  • Pending
  • Resolved
  • Running
  • Running With Error
  • Running With Warning
  • Skipped
  • Stop
  • Stopped With Error
  • Stopped With Warning
  • Unknown
  • Uploading
  • Validating
  • Waiting
completeStringDate and time that the subtask was completed
createStringDate and time that the subtask was created
createdByStringUser name that created the subtask
filterStatusKeyStringThis can be one of the following values.
  • Complete
  • Error
hasNotesBooleanIndicates whether the job has notes. This can be one of the following values.
  • true. The job has notes.
  • false. The job does not have notes.
hasNotesStringStringIndicates whether the job has notes. This can be one of the following values.
  • yes. The job has notes.
  • no. The job does not have notes.
hiddenBooleanIndicates whether the alert is hidden in the web interface. This can be one of the following values.
  • true. The alert is not displayed in the web interface.

  • false. (default) The alert is displayed in the web interface.

isDeletableBooleanIndicates whether the subtask can be deleted. This can be one of the following values.
  • true. The subtask can be deleted.

  • false. The subtask cannot be deleted.

isStoppableBooleanIndicates whether the subtask can be stopped. This can be one of the following values.
  • true. The subtask can be stopped.

  • false. The subtask cannot be stopped.

jobCategoryStringSubtask category. This can be one of the following values.
  • Backup
  • Configuration
  • Custom
  • Firmware
  • Health
  • Inventory
  • Management
  • OsDeployment
  • OsDriverUpdates
  • OsImport
  • OsProfileExport
  • Power
  • RemoteAccess
  • SelfMaintenance
  • Service
  • SwitchConfiguration
  • SystemID
  • Unknown
jobCategoryKeyStringSubtask category key. This can be one of the following values.
  • Backup
  • Configuration
  • Custom
  • Firmware
  • Health
  • Inventory
  • Management
  • OsDeployment
  • OsDriverUpdates
  • OsImport
  • OsProfileExport
  • Power
  • RemoteAccess
  • SelfMaintenance
  • Service
  • SwitchConfiguration
  • SystemID
  • Unknown
jobTitleString 
jobUIDStringSubtask UUID
noteAddBooleanIdentifies whether notes can be added to this job. This can be one of the following values.
  • true. Notes can be added to this job
  • false. Notes cannot be added to this job
percentageIntegerPercentage complete of the subtask. This can be an integer from 0 - 100.
scheduleIdString(Scheduled jobs only) ID of the schedule that started the job
scheduleTypeString(Scheduled jobs only) Type of schedule. This can be one of the following values.
  • ONE_TIME. The job runs one time on all target devices. If the specified start and end date are in the past, the job runs imminently.
  • RECURRING. The job runs on the specified dates and times on all target devices.
  • EVENT_TRIGGERED. The job runs when a specified event occurs. This job runs only on the device that generated the event.
startStringDate and time that the subtask started
stateIconKeyDateStatus icon. This can be one of the following values.
  • BlueComplete Informational icon
  • Complete Completed jobs icon
  • Error Critical status icon
  • Investigating Investigating icon
  • Running Running jobs icon
  • Spinning Running jobs icon
  • Stopped Critical status icon
  • Warning Warning status icon
statusStringState of the job. This can be one of the following values.
  • Aborted
  • Blocked
  • Cancelled
  • CancelledWithError
  • CancelledWithWarning
  • Cancelling
  • Complete
  • CompleteWithError
  • CompleteWithWarning
  • Expired
  • Initializing
  • Interrupted
  • InterruptedWithError
  • InterruptedWithWarning
  • Investigating
  • Pending
  • Resolved
  • Running
  • RunningWithError
  • RunningWithWarning
  • Skipped
  • Stopped
  • StoppedWithError
  • StoppedWithWarning
  • Unknown
  • Uploading
  • Validating
  • Waiting
stoppableStringStringIndicates whether this job can be stopped. This can be one of the following values.
  • yes

  • no

stoppedByStringUser name that canceled the job
summaryObjectInformation about the job summary
 severityStringSeverity of the job. This can be one of the following values.
  • Informational. The request started or ended successfully.
  • Warning. The request completed, but there are some problems that you must be aware of . You can decide if action is needed.
  • Critical. The request failed. Action is needed now and the scope is broad (perhaps an imminent outage to a critical resource will result).
 severityTextStringSeverity of the job. This can be one of the following values.
  • Informational. The request started or ended successfully.
  • Warning. The request completed, but there are some problems that you must be aware of . You can decide if action is needed.
  • Critical. The request failed. Action is needed now and the scope is broad (perhaps an imminent outage to a critical resource will result).
 summaryActionArray of objectsInformation about the recovery actions
  formatArray of strings 
  textStringRecovery actions to resolve the job
 summaryDescriptionStringShort descriptions of the job
targetStringName of the group or device that is the target for the subtask or Not Available
targetUUIDStringUUID of the group or device that is the target for the subtask
translatedStatusStringTranslated job status. This can be one of the following values.
  • Aborted
  • Blocked
  • Cancelled
  • Cancelled With Error
  • Cancelled With Warning
  • Cancelling
  • Complete
  • Complete With Errors
  • Complete With Warning
  • Expired
  • Initializing
  • Interrupted
  • Interrupted With Error
  • Interrupted With Warning
  • Investigating
  • Pending
  • Resolved
  • Running
  • Running With Error
  • Running With Warning
  • Skipped
  • Stop
  • Stopped With Error
  • Stopped With Warning
  • Unknown
  • Uploading
  • Validating
  • Waiting
The following example is returned if the request is successful.
[{
"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"
}]