IBM i Task Web Services

Overview

Universal Controller supports the following RESTful-based web services for IBM i 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 IBM i Task


Description

URI

http://host_name/uc/resources/task

HTTP Method

POST

Description

Creates a new IBM i task.

Example URI

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

Consumes Content-Type

application/xml, application/json

Produces Content-Type

n/a

Example

See IBM i 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 IBM i 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 IBM i Task properties without modifying related records, use the excludeRelated property.

Example

See IBM i 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 an IBM i 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

IBM i Task: XML and JSON Examples

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

The exportReleaseLevel and exportTable properties are specified as attributes in XML.


Examples

XML

JSON

Example for Task

 XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<taskIbmi exportReleaseLevel="7.7.1.0" exportTable="ops_task_ibmi" retainSysIds="true" version="2">
    <variables/>
    <notes/>
    <agent />
    <agentCluster>Opswise - Default IBM i Cluster</agentCluster>
    <agentClusterVar />
    <agentVar />
    <broadcastCluster />
    <broadcastClusterVar />
    <cpDuration />
    <cpDurationUnit>Minutes</cpDurationUnit>
    <credentials />
    <credentialsVar />
    <customField1/>
    <customField2/>
    <efDayConstraint>None</efDayConstraint>
    <efDuration>00:00:00:00</efDuration>
    <efEnabled>false</efEnabled>
    <efNthAmount>5</efNthAmount>
    <efOffsetDuration />
    <efOffsetDurationUnit>Minutes</efOffsetDurationUnit>
    <efOffsetPercentage>0</efOffsetPercentage>
    <efOffsetType>Percentage</efOffsetType>
    <efTime>00:00</efTime>
    <efType>Time</efType>
    <enforceVariables>false</enforceVariables>
    <exclusiveWithSelf>false</exclusiveWithSelf>
    <executionRestriction>None</executionRestriction>
    <firstRun></firstRun>
    <holdResources>false</holdResources>
    <lastRun></lastRun>
    <lfDayConstraint>None</lfDayConstraint>
    <lfDuration>00:00:00:00</lfDuration>
    <lfEnabled>false</lfEnabled>
    <lfNthAmount>5</lfNthAmount>
    <lfOffsetDuration />
    <lfOffsetDurationUnit>Minutes</lfOffsetDurationUnit>
    <lfOffsetPercentage>0</lfOffsetPercentage>
    <lfOffsetType>Percentage</lfOffsetType>
    <lfTime>00:00</lfTime>
    <lfType>Time</lfType>
    <lockVariables>false</lockVariables>
    <logLevel>Inherited</logLevel>
    <lsDayConstraint>None</lsDayConstraint>
    <lsDuration>00:00:00:00</lsDuration>
    <lsEnabled>false</lsEnabled>
    <lsNthAmount>5</lsNthAmount>
    <lsTime>00:00</lsTime>
    <lsType>Time</lsType>
    <name>stonebranch-ibmi-00</name>
    <actions/>
    <opswiseGroups/>
    <overrideInstanceWait>No</overrideInstanceWait>
    <resPriority>10</resPriority>
    <resolveNameImmediately>false</resolveNameImmediately>
    <restrictionPeriod>None</restrictionPeriod>
    <restrictionPeriodAfterDate />
    <restrictionPeriodAfterTime />
    <restrictionPeriodBeforeDate />
    <restrictionPeriodBeforeTime />
    <restrictionPeriodDateList/>
    <retryIndefinitely>false</retryIndefinitely>
    <retryInterval>60</retryInterval>
    <retryMaximum>0</retryMaximum>
    <retrySuppressFailure>false</retrySuppressFailure>
    <runCount>0</runCount>
    <runTime>0</runTime>
    <simulation>false</simulation>
    <startHeld>false</startHeld>
    <startHeldReason />
    <summary />
    <sysId>6e7386cfac5f4c36b758e9d46e23f4f2</sysId>
    <exclusiveTasks/>
    <virtualResources/>
    <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 />
    <command>${command}</command>
    <commandOrScript>Command</commandOrScript>
    <commandType>SBMJOB</commandType>
    <endSeverity>30</endSeverity>
    <environment/>
    <exitCodeOutput />
    <exitCodeProcessing>Success Exitcode Range</exitCodeProcessing>
    <exitCodeText />
    <exitCodes>0</exitCodes>
    <jobDescription />
    <jobName />
    <jobPriority />
    <jobQueue />
    <outputFailureOnly>false</outputFailureOnly>
    <outputPriority />
    <outputQueue />
    <outputReturnFile />
    <outputReturnNline>100</outputReturnNline>
    <outputReturnSline>1</outputReturnSline>
    <outputReturnText />
    <outputReturnType>NONE</outputReturnType>
    <outputType>STDOUT</outputType>
    <parameters />
    <printDevice />
    <retryExitCodes />
    <runAsSudo>false</runAsSudo>
    <runtimeDir />
    <script />
    <waitForOutput>false</waitForOutput>
</taskIbmi>

 JSON

{
    "type": "taskIbmi",
    "actions": {
        "abortActions": [],
        "emailNotifications": [],
        "setVariableActions": [],
        "snmpNotifications": [],
        "systemOperations": []
    },
    "agent": null,
    "agentCluster": "Opswise - Default IBM i Cluster",
    "agentClusterVar": null,
    "agentVar": null,
    "broadcastCluster": null,
    "broadcastClusterVar": null,
    "command": "${command}",
    "commandOrScript": "Command",
    "commandType": "SBMJOB",
    "cpDuration": null,
    "cpDurationUnit": "Minutes",
    "credentials": null,
    "credentialsVar": null,
    "customField1": {
        "label": null,
        "value": null
    },
    "customField2": {
        "label": null,
        "value": null
    },
    "efDayConstraint": "None",
    "efDuration": "00:00:00:00",
    "efEnabled": false,
    "efNthAmount": 5,
    "efOffsetDuration": null,
    "efOffsetDurationUnit": "Minutes",
    "efOffsetPercentage": 0,
    "efOffsetType": "Percentage",
    "efTime": "00:00",
    "efType": "Time",
    "endSeverity": 30,
    "enforceVariables": false,
    "environment": [],
    "exclusiveTasks": [],
    "exclusiveWithSelf": false,
    "executionRestriction": "None",
    "exitCodeOutput": null,
    "exitCodeProcessing": "Success Exitcode Range",
    "exitCodeText": null,
    "exitCodes": "0",
    "exportReleaseLevel": "7.7.1.0",
    "exportTable": "ops_task_ibmi",
    "firstRun": "",
    "holdResources": false,
    "jobDescription": null,
    "jobName": null,
    "jobPriority": null,
    "jobQueue": null,
    "lastRun": "",
    "lfDayConstraint": "None",
    "lfDuration": "00:00:00:00",
    "lfEnabled": false,
    "lfNthAmount": 5,
    "lfOffsetDuration": null,
    "lfOffsetDurationUnit": "Minutes",
    "lfOffsetPercentage": 0,
    "lfOffsetType": "Percentage",
    "lfTime": "00:00",
    "lfType": "Time",
    "lockVariables": false,
    "logLevel": "Inherited",
    "lsDayConstraint": "None",
    "lsDuration": "00:00:00:00",
    "lsEnabled": false,
    "lsNthAmount": 5,
    "lsTime": "00:00",
    "lsType": "Time",
    "name": "stonebranch-ibmi-00",
    "notes": [],
    "opswiseGroups": [],
    "outputFailureOnly": false,
    "outputPriority": null,
    "outputQueue": null,
    "outputReturnFile": null,
    "outputReturnNline": "100",
    "outputReturnSline": "1",
    "outputReturnText": null,
    "outputReturnType": "NONE",
    "outputType": "STDOUT",
    "overrideInstanceWait": "No",
    "parameters": null,
    "printDevice": null,
    "resPriority": 10,
    "resolveNameImmediately": false,
    "restrictionPeriod": "None",
    "restrictionPeriodAfterDate": null,
    "restrictionPeriodAfterTime": null,
    "restrictionPeriodBeforeDate": null,
    "restrictionPeriodBeforeTime": null,
    "restrictionPeriodDateList": [],
    "retainSysIds": true,
    "retryExitCodes": null,
    "retryIndefinitely": false,
    "retryInterval": 60,
    "retryMaximum": 0,
    "retrySuppressFailure": false,
    "runAsSudo": false,
    "runCount": 0,
    "runTime": 0,
    "runtimeDir": null,
    "script": null,
    "simulation": false,
    "startHeld": false,
    "startHeldReason": null,
    "summary": null,
    "sysId": "6e7386cfac5f4c36b758e9d46e23f4f2",
    "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": 2,
    "virtualResources": [],
    "waitForOutput": false
}


See Task Web Services - Task Actions for XML and JSON examples of task actions.

See Task Web Services - Task-Related Records for XML and JSON examples of task-related records.

Properties