Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
Create a Universal Monitor Task
Create a Universal Monitor Task

Create a Universal Monitor Task


Description

URI

http://host_name/uc/resources/task

HTTP Method

POST

Description

Creates a new Universal Monitor task.

To persist sysIds, use the retainSysIds property.

Example URI

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

Consumes Content-Type

application/xml, application/json

Produces Content-Type

n/a

Example

See Universal Monitor Task: XML and JSON Examples, below.

Properties

See Properties.

Example Response

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

Anchor
Modify a Universal Monitor Task
Modify a Universal Monitor Task

Modify a Universal Monitor 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 Universal Monitor Task properties without modifying related records, use the excludeRelated property.

Example

See Universal Monitor 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>.

Anchor
Read a Universal Monitor Task
Read a Universal Monitor Task

Read a Universal Monitor 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

Properties

See Properties.

Anchor
Universal Monitor Task XML and JSON Examples
Universal Monitor Task XML and JSON Examples

Universal Monitor Task: XML and JSON Examples

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

...

Examples

XML

JSON

Example for Task


Expand
titleXML
<taskUniversalMonitor exportReleaseLevel="7.2.0.0" exportTable="ops_task_universal_monitor" 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>
<eventTemplate />
<eventType>Local/<eventType> <executionRestriction>Run</executionRestriction>
<expirationAction>Finished</expirationAction>
<filter>
<criterion>
<name>tfield</name>
<operator>NOT_EQUALS</operator>
<value>Test</value>
</criterion>
<logicalOperator>And</logicalOperator>
</filter>
<firstRun>2021-03-15 13:59:37 -0400</firstRun> <holdResources>false</holdResources>
<lastRun>2021-03-16 17:12:42 -0400</lastRun>
<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>
<name>uc - Test Email</name> <opswiseGroups />
<relativeTimeFrom>00:00</relativeTimeFrom>
<relativeTimeTo /> <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>
<taskUniversal>Sample1</taskUniversal>
<taskUniversalVariables>
<variable>
<name>v_enabled</name>
<value>${var}</value>
<resolution>Enabled</resolution>
</variable>
<variable>
<name>v_disabled</name>
<value>${var}</value>
<resolution>Disabled</resolution>
</variable>
</taskUniversalVariables>
<template>Test Template</template>
<templateEventTemplate label="Test Event B">test_event_b</templateEventTemplate>
<timeScope>-- None --</timeScope> <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 /> </taskUniversalMonitor>



Expand
titleJSON
{
  "type": "taskUniversalMonitor",
  "actions": {
    "abortActions": [],
    "emailNotifications": [],
    "setVariableActions": [],
    "snmpNotifications": [],
    "systemOperations": []
  },
"cpDuration": null, "cpDurationUnit": "Minutes", "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", "eventTemplate": null,
"eventType": "Local", "exclusiveTasks": [], "executionRestriction": "Run",
"expirationAction": "Finished",
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_task_universal_monitor",
"filter": {
"criteria": [
{
"type": "criterion",
"name": "tfield",
"operator": "NOT_EQUALS",
"value": "Test"
}
],
"logicalOperator": "And",
}
"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",
"name": "uc - Test Email", "notes": [], "opswiseGroups": null,
"relativeTimeFrom": "00:00",
"relativeTimeTo": 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",
"taskUniversal": "Sample1",
"taskUniversalVariables": [
{
"name": "v_enabled",
"resolution": "Enabled",
"value": "${var}"
},
{
"name": "v_disabled",
"resolution": "Disabled",
"value": "${var}"
}
]
"template": "Test Template",
"templateEventTemplate":
"label": "Test Event B",
"value": test_event_b"
},
"timeScope": "-- None --", "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": [] }



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.

Anchor
Properties
Properties

Properties