Manual Task Web Services

Overview

Universal Controller supports the following RESTful-based web services for Manual Task operations, which are listed alphabetically on this page.

Formatting specifications for each web service, including details about parameter requirements, are provided.

Links to detailed information about the properties used in these web services also is located on this page.
 

For information on Task web services that are applicable to all task types, see:

Create a Manual Task


Description

URI

http://host_name/uc/resources/task

HTTP Method

POST

Description

Creates a new Manual task.

Example URI

http://localhost:8080/uc/resources/task

Consumes Content-Type

application/xml, application/json

Produces Content-Type

n/a

Example

See Manual Task: XML and JSON Examples, below.

Properties

See Properties.

Example Response

  • Status 200 /OK
    Successfully created the <task type> task with sysId <sysId>.

Modify a Manual Task


Description

URI

http://host_name/uc/resources/task

Consumes Content-Type

application/xml, application/json

Produces Content-Type

n/a

HTTP Method

PUT

Description

Modifies the task specified by the sysId in the request.
 
To modify Manual Task properties without modifying related records, use the excludeRelated property.

Example

See Manual Task: XML and JSON Examples.

Properties

See Properties.

Example Response

  • Status 200 /OK
    Successfully updated the <task type> task with sysId <sysId> to version <version>.

Read a Manual Task


Description

URI

http://host_name/uc/resources/task

HTTP Method

GET

Description

Retrieves information on the specified task.

Request Parameters

taskid or taskname

Mutually Exclusive Parameters

taskid and taskname

Example URI

Consumes Content-Type

n/a

Produces Content-Type

application/xml, application/json

Example Response

Manual Task: XML and JSON Examples

The retainSysIds and version properties are specified as attributes in XML.

The exportReleaseLevel and /wiki/spaces/UC71x/pages/5179227 properties are specified as attributes in XML.


Examples

XML

JSON

Example for Task

 XML
<taskManual exportReleaseLevel="7.2.0.0" exportTable="ops_task_manual" retainSysIds="true" version="1">
       <actions />
       <variables />
       <notes />
       <virtualResources />
       <exclusiveTasks />
<avgRunTime>3</avgRunTime>
<avgRunTimeDisplay>3 Seconds</avgRunTimeDisplay> <cpDuration /> <cpDurationUnit>Minutes</cpDurationUnit> <credentials /> <credentialsVar /> <customField1 label="Domain">web.com</customField1> <customField2 /> <efDayConstraint>Nth</efDayConstraint> <efDuration>00:00:00:00</efDuration> <efEnabled>false</efEnabled> <efNthAmount>10</efNthAmount>        <efOffsetDuration />
       <efOffsetDurationUnit>Minutes</efOffsetDurationUnit>
       <efOffsetPercentage>0</efOffsetPercentage>
       <efOffsetType>Percentage</efOffsetType>
       <efTime>00:00</efTime> <efType>Time</efType> <executionRestriction>Run</executionRestriction>
<firstRun>2021-03-15 13:59:37 -0400</firstRun> <holdResources>false</holdResources>
<lastRun>2021-03-16 17:12:42 -0400</lastRun>
<lastRunTime>9</lastRunTime>
<lastRunTimeDisplay>9 seconds</lastRunTimeDisplay> <lfDayConstraint>Nth</lfDayConstraint> <lfDuration>00:00:00:00</lfDuration> <lfEnabled>false</lfEnabled> <lfNthAmount>1</lfNthAmount>        <lfOffsetDuration />
       <lfOffsetDurationUnit>Minutes</lfOffsetDurationUnit>
       <lfOffsetPercentage>0</lfOffsetPercentage>
       <lfOffsetType>Percentage</lfOffsetType>
       <lfTime>00:00</lfTime> <lfType>Time</lfType> <lsDayConstraint>Nth</lsDayConstraint> <lsDuration>00:00:00:00</lsDuration> <lsEnabled>false</lsEnabled> <lsNthAmount>7</lsNthAmount> <lsTime>00:00</lsTime> <lsType>Time</lsType>
<maxRunTime>9</maxRunTime>
<maxRunTimeDisplay>9 Seconds</maxRunTimeDisplay>
<minRunTime>3</minRunTime>
<minRunTimeDisplay>3 Seconds</minRunTimeDisplay> <name>uc - Test Email</name> <opswiseGroups /> <resolveNameImmediately>false</resolveNameImmediately> <resPriority>10</resPriority> <restrictionPeriod>Span</restrictionPeriod> 
<restrictionPeriodAfterDate
>2017-11-10</restrictionPeriodAfterDate> <restrictionPeriodAfterTime>10:30</restrictionPeriodAfterTime> <restrictionPeriodBeforeDate>2017-11-20</restrictionPeriodBeforeDate> <restrictionPeriodBeforeTime>15:00</restrictionPeriodBeforeTime> <restrictionPeriodDateList />
<runCount>32</runCount>
<runTime>108</runTime> <startHeld>false</startHeld> <startHeldReason /> <summary>Test Email</summary> <sysId>fb59a227517a421a92c15ff5aefe3b66</sysId> <timeZonePref>-- System Default --</timeZonePref> <twDelayAmount /> <twDelayDuration>00:00:00:00</twDelayDuration> <twDelayType>None</twDelayType> <twWaitAmount /> <twWaitDayConstraint>NONE</twWaitDayConstraint> <twWaitDuration>00:00:00:00</twWaitDuration> <twWaitTime>00:00</twWaitTime> <twWaitType>None</twWaitType> <twWorkflowOnly>-- System Default --</twWorkflowOnly> <userEstimatedDuration /> </taskManual>
 JSON
{
  "type": "taskManual",
  "actions": {
    "abortActions": [],
    "emailNotifications": [],
    "setVariableActions": [],
    "snmpNotifications": [],
    "systemOperations": []
  },
"avgRunTime": 3,
"avgRunTimeDisplay": "3 Seconds", "cpDuration": null, "cpDurationUnit": "Minutes", "credentials": null, "credentialsVar": null, "customField1": { "label": "Domain", "value": "http://qa-cntlr-mssql:8080/uc/" }, "customField2": { "label": null, "value": null }, "efDayConstraint": "Nth Day", "efDuration": "00:00:00:00", "efEnabled": false, "efNthAmount": 10,   "efOffsetDuration": null, 
  "efOffsetDurationUnit": "Minutes",
  "efOffsetPercentage": 0,
  "efOffsetType": "Percentage",
  "efTime": "00:00", "efType": "Time", "excludeRelated": false, "exclusiveTasks": [], "executionRestriction": "Run",
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_task_manual",
"firstRun": "2021-03-15 13:59:37 -0400", "holdResources": false,
"lastRun": "2021-03-16 17:12:42 -0400",
"lastRunTime": 9,
"lastRunTimeDisplay": "9 Seconds", "lfDayConstraint": "Nth Day", "lfDuration": "00:00:00:00", "lfEnabled": false, "lfNthAmount": 1,   "lfOffsetDuration": null, 
  "lfOffsetDurationUnit": "Minutes",
  "lfOffsetPercentage": 0,
  "lfOffsetType": "Percentage",
  "lfTime": "00:00", "lfType": "Time", "lsDayConstraint": "Nth Day", "lsDuration": "00:00:00:00", "lsEnabled": false, "lsNthAmount": 7, "lsTime": "00:00", "lsType": "Time",
"maxRunTime": 9,
"maxRunTimeDisplay": "9 Seconds",
"minRunTime": 3,
"minRunTimeDisplay": "3 Seconds", "name": "uc - Test Email", "notes": [], "opswiseGroups": null, "resolveNameImmediately": false, "resPriority": 10, "restrictionPeriod": "Span", "restrictionPeriodAfterDate": "2017-11-10", "restrictionPeriodAfterTime": "10:30", "restrictionPeriodBeforeDate": "2017-11-20", "restrictionPeriodBeforeTime": "15:00", "restrictionPeriodDateList": [], "retainSysIds": true,
"runCount": 32,
"runTime": 108, "startHeld": false, "startHeldReason": null, "summary": "Test Email", "sysId": "fb59a227517a421a92c15ff5aefe3b66", "timeZonePref": "-- System Default --", "twDelayAmount": null, "twDelayDuration": "00:00:00:00", "twDelayType": "None", "twWaitAmount": null, "twWaitDayConstraint": "NONE", "twWaitDuration": "00:00:00:00", "twWaitTime": "00:00", "twWaitType": "None", "twWorkflowOnly": "-- System Default --", "userEstimatedDuration": null, "variables": [], "version": 1, "virtualResources": [] }

Examples for Task Actions

 XML

Abort

<abortAction>
       <description />
       <exitCodes />
       <notifyOnEarlyFinish>false</notifyOnEarlyFinish>
       <notifyOnLateFinish>false</notifyOnLateFinish>
       <notifyOnLateStart>false</notifyOnLateStart>
       <status>Waiting</status>
       <sysId>ad42c3268468425db6e1580cd53f57f0</sysId>
       <cancelProcess>false</cancelProcess>
       <haltOnFinish>false</haltOnFinish>
       <overrideExitCode />
</abortAction>


 
Email Notification

<emailNotification>
       <description />
       <exitCodes />
       <notifyOnEarlyFinish>false</notifyOnEarlyFinish>
       <notifyOnLateFinish>false</notifyOnLateFinish>
       <notifyOnLateStart>false</notifyOnLateStart>
       <status>Success</status>
       <sysId>2b72cdaaf3a145e4bbae5a7ddd24baff</sysId>
       <attachFile>false</attachFile>
       <attachJobLog>false</attachJobLog>
       <attachStdError>false</attachStdError>
       <attachStdOut>true</attachStdOut>
       <bcc />
       <body>test body</body>
       <cc />
       <emailConnection>uc - Gmail Account</emailConnection>
       <emailTemplate />
       <emailTemplateVar />
       <fileName />
       <fileNumLines>100</fileNumLines>
       <fileScanText />
       <fileStartLine>1</fileStartLine>
       <joblogNumLines>100</joblogNumLines>
       <joblogScanText />
       <joblogStartLine>1</joblogStartLine>
       <replyTo>replyTo@test.com</replyTo>
       <report>
             <groupName />
             <title>report1</title>
             <userName>ops.admin</userName>
       </report>
       <stderrNumLines>100</stderrNumLines>
       <stderrScanText />
       <stderrStartLine>1</stderrStartLine>
       <stdoutNumLines>100</stdoutNumLines>
       <stdoutScanText />
       <stdoutStartLine>1</stdoutStartLine>
       <subject />
       <to>test@test.com</to>
</emailNotification>


 
Set Variable

<setVariableAction>
       <description />
       <exitCodes />
       <notificationOption>Operation Failure</notificationOption>
       <notifyOnEarlyFinish>false</notifyOnEarlyFinish>
       <notifyOnLateFinish>false</notifyOnLateFinish>
       <notifyOnLateStart>false</notifyOnLateStart>
       <status>Waiting</status>
       <sysId>f7824e38add745c2bf41017b07697bdf</sysId>
       <variableName>name</variableName>
       <variableScope>Self</variableScope>
       <variableValue />
</setVariableAction>

 
 
SNMP Notification


<snmpNotification>
       <description />
       <exitCodes />
       <notifyOnEarlyFinish>false</notifyOnEarlyFinish>
       <notifyOnLateFinish>false</notifyOnLateFinish>
       <notifyOnLateStart>false</notifyOnLateStart>
       <status>Resource Requested</status>
       <sysId>1a1ddf2fa7f7466db8b5fc7863fc4ea3</sysId>
       <severity>Normal</severity>
       <snmpManager>test manager</snmpManager>
</snmpNotification>


 
System Operation

<systemOperation>
       <description />
       <exitCodes />
       <notifyOnEarlyFinish>false</notifyOnEarlyFinish>
       <notifyOnLateFinish>false</notifyOnLateFinish>
       <notifyOnLateStart>false</notifyOnLateStart>
       <status>Held</status>
       <sysId>742beaf652834054b1edc37e6423700d</sysId>
       <agent />
       <agentCluster />
       <agentClusterVar />
       <agentVar />
       <execCommand>Cancel</execCommand>
       <execCriteria>Oldest Active Instance</execCriteria>
       <execId />
       <execLookupOption>Task</execLookupOption>
       <execName />
       <execWorkflowNameCond />
       <execWorkflowName />
       <limit />
       <notificationOption>Operation Failure</notificationOption>
       <operation>Run Task Instance Command</operation>
       <task>uc - B=${B}</task>
       <taskLimitType>Unlimited</taskLimitType>
       <taskVar />
       <trigger />
       <triggerVar />
       <variables>
             <variable>
                   <name>var1</name>
                   <value>val1</value>
             </variable>
             <variable>
                   <name>var2</name>
                   <value>val2</value>
             </variable>
       </variables>
       <variablesUnresolved>false</variablesUnresolved>
       <variablesUnresolved />
       <virtualResource />
       <virtualResourceVar />
</systemOperation>
 JSON

Abort


"abortActions": [ { 
  "cancelProcess": false,
  "description": null,
  "exitCodes": null,
  "haltOnFinish": true,
  "notifyOnEarlyFinish": false,
  "notifyOnLateFinish": false,
  "notifyOnLateStart": false,
  "overrideExitCode": null,
  "status": "Waiting",
  "sysId": "ad42c3268468425db6e1580cd53f57f0"
} ],


 
Email Notification


"emailNotifications": [ { 
  "attachFile": false,
  "attachJobLog": false,
  "attachStdError": false,
  "attachStdOut": true,
  "bcc": null,
  "body": "test body",
  "cc": null,
  "description": null,
  "emailConnection": "uc - Gmail Account",
  "emailTemplate": null,
  "emailTemplateVar": null,
  "exitCodes": null,
  "fileName": null,
  "fileNumLines": 100,
  "fileScanText": null,
  "fileStartLine": 1,
  "joblogNumLines": 100,
  "joblogScanText": null,
  "joblogStartLine": 1,
  "notifyOnEarlyFinish": false,
  "notifyOnLateFinish": false,
  "notifyOnLateStart": false,
  "replyTo": "replyTo@test.com",
  "report": {
    "groupName": null,
    "title": "report1",
    "userName": "ops.admin"
  },
  "status": "Success",
  "stderrNumLines": 100,
  "stderrScanText": null,
  "stderrStartLine": 1,
  "stdoutNumLines": 100,
  "stdoutScanText": null,
  "stdoutStartLine": 1,
  "subject": null,
  "sysId": "2b72cdaaf3a145e4bbae5a7ddd24baff",
  "to": "test@test.com"
  }  
],   


Set Variable

"setVariableActions": [ {
  "description": null,
  "exitCodes": null,
  "notificationOption": "Operation Failure",
  "notifyOnEarlyFinish": false,
  "notifyOnLateFinish": false,
  "notifyOnLateStart": false,
  "status": "Waiting",
  "sysId": "f7824e38add745c2bf41017b07697bdf",
  "variableName": "name",
  "variableScope": "Self",
  "variableValue": null
  } 
],

 
SNMP Notification


"snmpNotifications": [ {
  "description": null,
  "exitCodes": null,
  "notifyOnEarlyFinish": false,
  "notifyOnLateFinish": false,
  "notifyOnLateStart": false,
  "severity": "Normal",
  "snmpManager": "test manager",
  "status": "Resource Requested",
  "sysId": "1a1ddf2fa7f7466db8b5fc7863fc4ea3"
  }
],


System Operation

"systemOperations": [ {
  "agent": null,
  "agentCluster": null,
  "agentClusterVar": null,
  "agentVar": null,
  "description": null,
  "execCommand": "Cancel",
  "execCriteria": "Oldest Active Instance",
  "execId": null,
  "execLookupOption": "Task",
  "execName": null,
  "execWorkflowNameCond": null,
  "execWorkflowName": null,
  "exitCodes": null,
  "limit": null,
  "notificationOption": "Operation Failure",
  "notifyOnEarlyFinish": false,
  "notifyOnLateFinish": false,
  "notifyOnLateStart": false,
  "operation": "Run Task Instance Command",
  "task": "uc - B=${B}",
  "taskLimitType": "Unlimited",
  "taskVar": null,
  "trigger": null,
  "triggerVar": null,
  "status": "Held",
  "sysId": "742beaf652834054b1edc37e6423700d",
  "variables": [ {
    "name": "var1",
    "value": "val1"
  },
  {
    "name": "var2",
    "value": "val2"
  } ],
  "variablesUnresolved": false,
  "virtualResource": null,
  "virtualResourceVar": null
  } ]

Examples for Task-Related Records

 XML

Mutually Exclusive Tasks

exclusiveTasks>
      <exclusiveTask>
            <sysId>5d2c0886b69745aa916a755602a1b77f</sysId>
            <task>Sleep 0<task>            
            <type>Direct<type>
      </exclusiveTask>
      <exclusiveTask>
            <sysId>c1342b7597f9492e927ce24c5126f9d4</sysId>
            <task>Sleep 30</task>
            <type>Direct</type>
      </exclusiveTask>
</exclusiveTasks>


Notes

<notes>
      <note>
            <sysId>8122cc80fbdb4e12b2c7118c172038fc</sysId>
            <text>note2 text</text>
            <title>note2</title>
      </note>
      <note>
            <sysId>eb95737f44664bd3bd4002690e00d715</sysId>
            <text>note1 text</text>
            <title>note1</title>
      </note>
</notes>


Variables

<variables>
       <variable>
             <description>description</description>
             <name>var1</name>
             <sysId>76af48c246954c128ef90da254044618</sysId>
             <value>value1</value>
       </variable>
       <variable>
             <description />
             <name>var2</name>
             <sysId>899912878e4b4a36848269dc8a75dc1c</sysId>
             <value>value2</value>
       </variable>
</variables>


Virtual Resources

<virtualResources>
       <virtualResource>
             <amount>1</amount>
             <resource>uc - Solo</resource>
             <sysId>4f5bb3fda5874dac8bb1897382d1317d</sysId>
       </virtualResource>
</virtualResources>
 JSON

Mutually Exclusive Tasks

"exclusiveTasks": [ {
  "sysId": "5d2c0886b69745aa916a755602a1b77f",
  "task": "Sleep 0",            
  "type": "Direct"
  },
  {
  "sysId": "c1342b7597f9492e927ce24c5126f9d4",
  "task": "Sleep 30",
  "type": "Direct"
  } ]


 
 
Notes

"notes": [ {
  "sysId": "8122cc80fbdb4e12b2c7118c172038fc",
  "text": "note2 text",
  "title": "note2"
  },
  {
  "sysId": "eb95737f44664bd3bd4002690e00d715",
  "text": "note1 text",
  "title": "note1"
  } ]


 
 
Variables

"variables": [ {
  "description": "description",
  "name": "var1",
  "sysId": "76af48c246954c128ef90da254044618",
  "value": "value1"
  },
  {
  "description": null,
  "name": "var2",
  "sysId": "899912878e4b4a36848269dc8a75dc1c",
  "value": "value2"
  } ]


 
 
Virtual Resources

"virtualResources": [ {
  "amount": 1,
  "resource": "uc - Solo",
  "sysId": "4f5bb3fda5874dac8bb1897382d1317d"
  } ]

Properties