/
Trigger Web Services

Trigger Web Services

Overview

Universal Controller supports the following RESTful-based web services for Trigger operations.

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

Common Web Services

The following web services are common to multiple Trigger types:

Detailed information for each of these web services is provided on this page.
 

Trigger-Specific Web Services

The following web services are specific to each Trigger type:

  • Create a Trigger
  • List Trigger Qualifying Times (Cron and Time Triggers only)
  • Modify a Trigger
  • Modify Time of Time Trigger (Time Trigger only)
  • Read a Trigger

For detail information about these Trigger-specific web services, see:

Assign an Execution User to a Trigger


Description

URI

http://host_name/uc/resources/trigger/assignexecutionuser

HTTP Method

POST

Description

Assigns an Execution User to the specified trigger.

URI Parameters

See Assign an Execution User to a Trigger: URI Parameters.

Authentication

HTTP Basic

Example URI

Consumes Content-Type

application/xml, application/json

Produces Content-Type

n/a

Example Request

See Assign an Execution User to a Trigger: XML and JSON Request Examples.

Request Properties

See Assign an Execution User to a Trigger: Request Properties.

Example Response

  • Status 200 /OK
    Successfully assigned execution user "test" to trigger "testTrigger".
  • Status 404 /Not Found
    Assign Execution User failed. You must provide an execution user.

Assign an Execution User to a Trigger: URI Parameters

Name

Description

Specifications

Required

Mutually Exclusive With

triggerid

Unique ID for this trigger.


Y
(unless triggername
is specified)

triggername

triggername

Name used within the Controller to identify this trigger.

Maximum 40 alphanumerics.

Y
(unless triggerid
is specified)

triggerid

Assign an Execution to a Trigger: XML and JSON Request Examples

Examples

XML

JSON

Request Example

 XML
<executionUser>
      <username>test</username>
      <password>pass1</password>
</executionUser> 
 JSON
{
 "username": "test",
 "password": "pass1" 
}

Assign an Execution User to a Trigger: Request Properties

Property

UI Field Name

Description

Specifications

Required

password

n/a

If the user executing this web service does not have the ops_admin role; Password of the Execution User.


Y

username

n/a

Name of the Execution User.

Wildcards are supported.

Y

Delete a Trigger


Description

URI

http://host_name/uc/resources/trigger

HTTP Method

DELETE

Description

Deletes the specified Trigger. 

URI Parameters

See Delete a Trigger: URI Parameters.

Authentication

HTTP Basic

Example URI

Example Response

  • Status 200 /OK
    Trigger deleted successfully.
  • Status 404 /Not Found
    A trigger with id "f87848b00a0001037f43e7c81c8ec969" does not exist.

Delete a Trigger: URI Parameters

Name

Description

Specifications

Required

Mutually Exclusive With

triggerid

Unique ID for this trigger.


Y
(unless triggername
is specified)

triggername

triggername

Name used within the Controller to identify this trigger.

Maximum 40 alphanumerics.

Y
(unless triggerid
is specified)

triggerid

Enable/Disable a Trigger


Description

URI

http://host_name/uc/resources/trigger/ops-enable-disable-trigger

HTTP Method

POST

Description

Enables/Disables a list of triggers.

Example URI

http://localhost:8080/uc/resources/trigger/ops-enable-disable-trigger

Authentication

HTTP Basic

Consumes Content-Type

application/xml, application/json

Produces Content-Type

application/xml, application/json

Example Request

See Enable/Disable a Trigger: XML and JSON Examples.

Request Properties

See Enable/Disable a Trigger: Request Trigger Properties.

Example Response

See Enable/Disable a Trigger: XML and JSON Examples.

Enable/Disable a Trigger: XML and JSON Examples

Examples

XML

JSON

Request Example

 XML
<enable-disable-trigger>
    <trigger enable="true" name="uc - 1st and 15th"></trigger>
    <trigger enable="false" name="uc - 1st Sunday of Month"></trigger>
</enable-disable-trigger> 
 JSON
  [{
     "enable": true,
     "name": "uc - 1st and 15th"
  },
  {
     "enable": false,
     "name": "uc - 1st Sunday of Month"
  }]

Response Example

 XML
<command-response>
    <type>Enable Disable Triggers</type>
    <success>true</success>
    <info>Successfully enabled trigger uc - 1st and 15th, Successfully disabled trigger uc - 1st Sunday of Month</info>
    <errors />
</command-response> 
 JSON
{
    "type": Enable/Disable Triggers",
    "success": true,
    "info": "Successfully enabled trigger "uc - 1st and 15th"., Successfully disabled trigger "uc - 1st Sunday of Month".",
    "errors": ""
}

Enable/Disable a Trigger: Request Trigger Properties

Property

UI Field Name

Description

Specifications

Required

trigger

n/a

There are two attributes for this property:

  • enable: Indication of whether to enable or disable the trigger. Only enabled triggers are processed by the Controller. Boolean; Valid values: true/false.
  • name: Name used within the Controller to identify this trigger. Maximum of 255 alphanumerics.

For example: <trigger enable="false" name="uc - 1st Sunday of Month"></trigger>


Y

List Triggers


Description

URI

http://host_name/uc/resources/trigger/list

HTTP Method

POST

Description

Lists triggers matching specific search criteria.

Example URI

http://localhost:8080/uc/resources/trigger/list

Authentication

HTTP Basic

Consumes Content-Type

application/xml, application/json

Produces Content-Type

application/xml, application/json

Example Request

See List Triggers: XML and JSON Examples.

Request Properties

See List Triggers: Request Properties.

Example Response

See List Triggers: XML and JSON Examples.

List Triggers: XML and JSON Examples

Examples

XML

JSON

Request Example

 XML
<generic-query-filter>
    <name>*time*</name>
    <enabled>true</enabled>
    <type>Time</type>
<tasks>Sleep 0, Sleep 60</tasks>
<description>manual1</description> </generic-query-filter>
 JSON
{
  "name": "*time*",
  "enabled": true,
  "type": "Time",  
"tasks": "Sleep 0, Sleep 60",
"description": "manual1" }

Response Example

 XML
<triggers>
    <trigger>
        <enabled>true</enabled>
        <name>Example time trigger 1</name>
        <sysID>07e69e9ac0a830016f4e065eb8e4ffe0</sysID>
        <type>Time</type>
        <version>1</version>
    </trigger>
    <trigger>
        <enabled>true</enabled>
        <name>Example time trigger 2</name>
        <sysID>07e69051c0a8300135a540b2d5b07ade</sysID>
        <type>Time</type>
        <version>1</version>
    </trigger>
</triggers>
 JSON
[ {
  "enabled": true,
  "name": "Example time trigger 1",
  "sysId": "68aca9ea398f4d17a7ca23eeaa1d4fa1",
  "type": "Time",
  "version": 5
}, {
  "enabled": true,
  "name": "Example time trigger 2",
  "sysId": "54c562ceb5e44aeca99f836b65fd86fb",
  "type": "Time",
  "version": 11
} ]

List Triggers: Request Properties

Property

UI Field Name

Description

Specifications

Required

description

Description

Filter the trigger list using the description.

Wildcards are supported.

N

enabled

Status

Indication of whether to list enabled (true) or disabled (false) triggers.

Boolean; Valid values: true/false.

N

name

Name

Name or partial name of one or more triggers.

Wildcards are supported.

N

tasks

Task(s)

List Triggers that reference any one of the specified links.

Comma-separated Task names.

N

type

n/a

Type of triggers to list.

Valid values:

  • As String = Cron, As Value = 1
  • As String = Time, As Value = 2
  • As String = File Trigger, As Value = 3
  • As String = Temporary, As Value = 4
  • As String = Task Monitor, As Value = 5
  • As String = Manual, As Value = 6
  • As String = Application Monitor, As Value = 8
  • As String = Composite, As Value = 9
  • As String = Variable Monitor, As Value = 10
  • As String = Email Monitor, As Value = 11
  • As String = Universal Monitor, As Value = 12
  • As String = z/OS Monitor, As Value = 13

N

List Triggers - Advanced

List Triggers - Advanced: URI Properties

Property

UI Field Name

Description

Specifications

Required

businessServices

Member of Business Services

Business Services that this trigger belongs to.



description

Description

Filter the trigger list using the description.

Wildcards are supported.

N

enabled

Status

Indication of whether to list enabled (true) or disabled (false) triggers.

Boolean; Valid values: true/false.

N

name

Name

Name or partial name of one or more triggers.

Wildcards are supported.

N

tasks

Task(s)

List Triggers that reference any one of the specified links.

Comma-separated Task names.

N

type

n/a

Type of triggers to list.

Valid values:

  • As String = Cron, As Value = 1
  • As String = Time, As Value = 2
  • As String = File Trigger, As Value = 3
  • As String = Temporary, As Value = 4
  • As String = Task Monitor, As Value = 5
  • As String = Manual, As Value = 6
  • As String = Application Monitor, As Value = 8
  • As String = Composite, As Value = 9
  • As String = Variable Monitor, As Value = 10
  • As String = Email Monitor, As Value = 11
  • As String = Universal Monitor, As Value = 12
  • As String = z/OS Monitor, As Value = 13


List Triggers - Advanced: XML and JSON Examples

Examples

XML

JSON

Response Example

 XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<triggers>
    <triggerCron exportReleaseLevel="7.2.0.0" exportTable="ops_trigger_cron" retainSysIds="true" version="1">
        <variables/>
        <action>Do Not Trigger</action>
<notes/> <calendar>System Default</calendar> <dayLogic>And</dayLogic> <dayOfMonth>*</dayOfMonth> <dayOfWeek>*</dayOfWeek> <description>cron test</description> <disabledBy></disabledBy> <disabledTime></disabledTime> <enabled>false</enabled> <enabledBy>ops.admin</enabledBy> <enabledTime>2021-06-01 11:29:48 -0400</enabledTime> <forecast>false</forecast> <hours>1</hours> <minutes>0</minutes> <month>*</month> <name>cron-1</name> <nextScheduledTime></nextScheduledTime> <opswiseGroups> <opswiseGroup>A</opswiseGroup> <opswiseGroup>B</opswiseGroup> </opswiseGroups> <rdExcludeBackup>false</rdExcludeBackup> <restriction>false</restriction> <restrictionAdjective>Every</restrictionAdjective> <restrictionComplex>false</restrictionComplex> <restrictionMode>Or</restrictionMode> <restrictionNoun>Day</restrictionNoun> <restrictionNthAmount>5</restrictionNthAmount> <restrictionQualifier>Year</restrictionQualifier> <restrictionSimple>false</restrictionSimple> <retentionDuration>1</retentionDuration> <retentionDurationPurge>false</retentionDurationPurge> <retentionDurationUnit>Days</retentionDurationUnit> <simulationOption>-- System Default --</simulationOption> <situation>Holiday</situation> <skipActive>false</skipActive> <skipAfterDate /> <skipAfterTime /> <skipBeforeDate /> <skipBeforeTime /> <skipCondition>None</skipCondition> <skipCount>0</skipCount> <skipDateList/> <skipRestriction>None</skipRestriction> <sysId>e9b45bc055b24f1abacfcea057af711d</sysId> <tasks> <task>bun-task-1</task> </tasks> <timeZone /> </triggerCron> <triggerManual exportReleaseLevel="7.2.0.0" exportTable="ops_trigger_manual" retainSysIds="true" version="1"> <variables/>
<notes/> <calendar>System Default</calendar> <description>Manual test</description> <disabledTime></disabledTime> <enabled>false</enabled> <enabledTime></enabledTime> <name>man-trig-1</name> <nextScheduledTime></nextScheduledTime> <opswiseGroups/> <rdExcludeBackup>false</rdExcludeBackup> <restrictionNthAmount>5</restrictionNthAmount> <retentionDuration>1</retentionDuration> <retentionDurationPurge>false</retentionDurationPurge> <retentionDurationUnit>Days</retentionDurationUnit> <sysId>728fc94ce80c4b97ae63ab741e902cc5</sysId> <tasks> <task>bun-task-1</task> </tasks> <timeZone /> </triggerManual> <triggerTm exportReleaseLevel="7.2.0.0" exportTable="ops_trigger_tm" retainSysIds="true" version="1"> <variables/> <action>Do Not Trigger</action>
<notes/> <calendar>System Default</calendar> <description>Task Monitor Trigger 1</description> <disabledTime></disabledTime> <enabled>false</enabled> <enabledTime></enabledTime> <name>Taskmon-trig-1</name> <nextScheduledTime></nextScheduledTime> <opswiseGroups> <opswiseGroup>A</opswiseGroup> </opswiseGroups> <rdExcludeBackup>false</rdExcludeBackup> <restriction>false</restriction> <restrictionAdjective>Every</restrictionAdjective> <restrictionComplex>false</restrictionComplex> <restrictionMode>Or</restrictionMode> <restrictionNoun>Day</restrictionNoun> <restrictionNthAmount>5</restrictionNthAmount> <restrictionQualifier>Year</restrictionQualifier> <restrictionSimple>false</restrictionSimple> <retentionDuration>1</retentionDuration> <retentionDurationPurge>false</retentionDurationPurge> <retentionDurationUnit>Days</retentionDurationUnit> <situation>Holiday</situation> <skipActive>false</skipActive> <skipAfterDate /> <skipAfterTime /> <skipBeforeDate /> <skipBeforeTime /> <skipCondition>None</skipCondition> <skipCount>0</skipCount> <skipDateList/> <skipRestriction>None</skipRestriction> <sysId>808272bdf2aa49a9bb8edcb700c40cfd</sysId> <tasks> <task>bun-task-1</task> </tasks> <timeZone /> <enabledEnd>00:00</enabledEnd> <enabledStart>00:00</enabledStart> <restrictedTimes>false</restrictedTimes> <taskMonitor>Task-mon-1</taskMonitor> </triggerTm> <triggerTime exportReleaseLevel="7.2.0.0" exportTable="ops_trigger_time" retainSysIds="true" version="1"> <variables/> <action>Do Not Trigger</action>
<notes/> <adjustInterval>false</adjustInterval> <adjustmentAmount>1</adjustmentAmount> <adjustmentType>Day</adjustmentType> <calendar>System Default</calendar> <dateAdjective>Every</dateAdjective> <dateAdjustment>None</dateAdjustment> <dateNoun>Day</dateNoun> <dateQualifier>Year</dateQualifier> <dayInterval>2</dayInterval> <dayStyle>Simple</dayStyle> <description>Time trigger test</description> <disabledTime></disabledTime> <enabled>false</enabled> <enabledEnd>00:00</enabledEnd> <enabledStart>00:00</enabledStart> <enabledTime></enabledTime> <forecast>false</forecast> <fri>false</fri> <intervalStartingDate>2021-06-01</intervalStartingDate> <mon>false</mon> <name>time-trig-1</name> <nextScheduledTime></nextScheduledTime> <nthAmount>5</nthAmount> <opswiseGroups> <opswiseGroup>A</opswiseGroup> </opswiseGroups> <rdExcludeBackup>false</rdExcludeBackup> <restrictedTimes>false</restrictedTimes> <restriction>false</restriction> <restrictionAdjective>Every</restrictionAdjective> <restrictionComplex>false</restrictionComplex> <restrictionMode>Or</restrictionMode> <restrictionNoun>Day</restrictionNoun> <restrictionNthAmount>5</restrictionNthAmount> <