GET /tasks/detail

Use this GET method to retrieve information about a specific job (task) and its subtasks.

Note:
  • This API requires Lenovo XClarity Administrator v1.2.2 or later.

  • This API will be deprecated in a future release. Use GET /tasks/<job_list> instead.

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, '{').
Attribute Required / Optional Type Description
format Required Array of strings List 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.

link Optional String URL to be linked to
text Required String or array of strings Text 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 user name and password is required.

Request URL

GET https://<management_server_IP>/tasks/detail

Query parameters

Parameters Required / Optional Description
jobUID=<job_id> Required ID of the task to be retrieved. To obtain the task ID, use the GET /tasks method.

Request body

None

Response codes

Code Description
200 OK
400 Bad request
401 Unauthorized. The user could not be authenticated.
403 Forbidden. The server could not authenticate this session.
404 Not found. The <job_id> does not exist.
409 Conflict
500 Internal server error. An internal error occurred.

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.
  • Complete

  • Error

  hasNotes Boolean Indicates 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.
  hasNotesString Boolean Indicates 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.
  hidden Boolean Indicates 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.

  isDeletable Boolean Indicates 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.

  isStoppable Boolean Indicates 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.

  jobCategory String Subtask 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

  jobCategoryKey String Subtask 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

  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:
  • true. Notes can be added to this job
  • false. Notes cannot be added to this job
  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.
  • 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

  status String State of the subtask. This can be one of the following values.
  • Aborted

  • Blocked

  • Cancelled

  • CancelledWithErrors

  • CancelledWithWarning

  • Cancelling

  • Complete

  • CompleteWithErrors

  • CompleteWithWarnings

  • Expired

  • Initializing

  • Interrupted

  • InterruptedWithError

  • InterruptedWithWarning

  • Investigating

  • Pending

  • Resolved

  • Running

  • RunningWithErrors

  • RunningWithWarnings

  • Skipped

  • Stop

  • StoppedWithError

  • StoppedWithWarnings

  • Unknown

  • Uploading

  • Validating

  • Waiting

  • Working

  stoppableString String Indicates whether the subtask can be stopped. This can be one of the following values.
  • yes

  • no

  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.
  • Informational. The task started or ended successfully.

  • Warning. The task completed, but there are some problems that the user must be aware of (for example, Windows was deployed but failed to set the IP addresses successfully). The user can decide if action is needed.

  • Critical. The task failed. Action is needed now and the scope is broad (perhaps an imminent outage to a critical resource will result).

    severityText String Severity of the job. This can be one of the following values.
  • Informational. The task started or ended successfully.

  • Warning. The task completed, but there are some problems that the user must be aware of (for example, Windows was deployed but failed to set the IP addresses successfully). The user can decide if action is needed.

  • Critical. The task failed. Action is needed now and the scope is broad (perhaps an imminent outage to a critical resource will result).

    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.
  • Aborted

  • Blocked

  • Cancelled With Warning

  • Cancelled

  • Cancelled With Errors

  • Cancelling

  • Complete

  • Complete With Errors

  • Complete With Warnings

  • Expired

  • Initializing

  • Interrupted

  • Interrupted With Error

  • Interrupted With Warning

  • Investigating

  • Pending

  • Resolved

  • Running

  • Running With Errors

  • Running With Warnings

  • Skipped

  • Stop

  • Stopped With Error

  • Stopped With Warnings

  • Unknown

  • Uploading

  • Validating

  • Waiting

  • Working

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.
  • Complete

  • Error

hasNotes Boolean Indicates 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.
hasNotesString String Indicates 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.
hidden Boolean Indicates 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.

isDeletable Boolean Indicates 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.

isStoppable Boolean Indicates 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.

jobCategory String Subtask 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

jobCategoryKey String Subtask 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

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.
  • true. Notes can be added to this job
  • false. Notes cannot be added to this job
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.
  • 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.

start String Date and time that the subtask started
stateIconKey Date Status 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

status String State of the job. This can be one of the following values.
  • Aborted

  • Blocked

  • Cancelled

  • CancelledWithErrors

  • CancelledWithWarning

  • Cancelling

  • Complete

  • CompleteWithErrors

  • CompleteWithWarnings

  • Expired

  • Initializing

  • Interrupted

  • InterruptedWithError

  • InterruptedWithWarning

  • Investigating

  • Pending

  • Resolved

  • Running

  • RunningWithErrors

  • RunningWithWarnings

  • Skipped

  • Stop

  • StoppedWithError

  • StoppedWithWarnings

  • Unknown

  • Uploading

  • Validating

  • Waiting

  • Working

stoppableString String Indicates whether this job can be stopped. This can be one of the following values.
  • yes

  • no

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.
  • Informational. The task started or ended successfully.

  • Warning. The task completed, but there are some problems that the user must be aware of (for example, Windows was deployed but failed to set the IP addresses successfully). The user can decide if action is needed.

  • Critical. The task failed. Action is needed now and the scope is broad (perhaps an imminent outage to a critical resource will result).

  severityText String Severity of the job. This can be one of the following values.
  • Informational. The task started or ended successfully.

  • Warning. The task completed, but there are some problems that the user must be aware of (for example, Windows was deployed but failed to set the IP addresses successfully). The user can decide if action is needed.

  • Critical. The task failed. Action is needed now and the scope is broad (perhaps an imminent outage to a critical resource will result).

  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.
  • Aborted

  • Blocked

  • Cancelled With Warning

  • Cancelled

  • Cancelled With Errors

  • Cancelling

  • Complete

  • Complete With Errors

  • Complete With Warnings

  • Expired

  • Initializing

  • Interrupted

  • Interrupted With Error

  • Interrupted With Warning

  • Investigating

  • Pending

  • Resolved

  • Running

  • Running With Errors

  • Running With Warnings

  • Skipped

  • Stop

  • Stopped With Error

  • Stopped With Warnings

  • Unknown

  • Uploading

  • Validating

  • Waiting

  • Working

Response example

{
   "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"
}