Webhooks Web Services
Universal Controller supports the following RESTful-based web services for Webhooks operations, which are listed alphabetically on this page.
- Assign an Execution User to a Webhook
- Disable a Webhook
- Enable a Webhook
- Enable/Disable Webhooks
- List Webhooks
- Modify Webhooks
- Read a Webhook
- Register a Webhook
- Unassign an Execution User from a Webhook
- Unregister a Webhook
Formatting specifications for each web service, including details about parameter requirements, are provided.
Assign an Execution User to a Webhook
Description | |
|---|---|
URI | http://host_name/uc/resources/webhook/assignexecutionuser |
HTTP Method | POST |
Description | Assigns an Execution User to the specified webhook. |
Example URI | http://localhost:8080/uc/resources/webhook/assignexecutionuser?webhookid= http://localhost:8080/uc/resources/webhook/assignExecutionUser?webhookname= |
Authentication | HTTP Basic |
Consumes Content-Type | application/xml, application/json |
Produces Content-Type | n/a |
Example Request | See Assign an Execution User to a Webhook: Example Request. |
Example Response |
|
Assign an Execution User to a Webhook: Payload Properties
Property | UI Field Name | Description | Specifications | Required |
|---|---|---|---|---|
| n/a | If the user executing this web service does not have the ops_admin role; Password of the Execution User. | Y | |
| n/a | Name of the Execution User. | Wildcards are supported. | Y |
Assign an Execution User to a Webhook: Example Request
- JSON
- XML
JSON
{
"username": "test",
"password": "pass1"
}
XML
<executionUser>
<username>test</username>
<password>pass1</password>
</executionUser>
Disable a Webhook
Description | |
|---|---|
URI | http://host_name/uc/resources/webhook/disable |
HTTP Method | POST |
Description | Disables a webhook. |
Example URI | |
Authentication | HTTP Basic |
Consumes Content-Type | n/a |
Produces Content-Type | application/xml, application/json |
Example Request | http://localhost:9090/uc/resources/webhook/disable?webhookname= http://localhost:9090/uc/resources/webhook/disable?webhookid= |
Example Response | See Enable/Disable a Webhook: XML and JSON Examples. |
Disable a Webhook: Query Parameters
Property | UI Field Name | Description | Specifications | Required | Mutually Exclusive With |
|---|---|---|---|---|---|
| ID used within the Controller to identify this webhook. | String; URI parameter. | Y |
| |
| Name | Name used within the Controller to identify this webhook. | String; URI parameter. | Y |
|
Enable a Webhook
Description | |
|---|---|
URI | http://host_name/uc/resources/webhook/enable |
HTTP Method | POST |
Description | Enables a webhook. |
Example URI | |
Authentication | HTTP Basic |
Consumes Content-Type | n/a |
Produces Content-Type | application/xml, application/json |
Example Request | http://localhost:9090/uc/resources/webhook/enable?webhookname= http://localhost:9090/uc/resources/webhook/enable?webhookid= |
Example Response |
Enable a Webhook: Query Parameters
Property | UI Field Name | Description | Specifications | Required | Mutually Exclusive With |
|---|---|---|---|---|---|
| ID used within the Controller to identify this webhook. | String; URI parameter. | Y |
| |
| Name | Name used within the Controller to identify this webhook. | String; URI parameter. | Y |
|
Enable/Disable Webhooks
Description | |
|---|---|
URI | http://host_name/uc/resources/webhook/enabledisable |
HTTP Method | POST |
Description | Enables/Disables a list of webhooks. |
Example URI | |
Authentication | HTTP Basic |
Consumes Content-Type | application/xml, application/json |
Produces Content-Type | application/xml, application/json |
Example Request | See Enable/Disable a Webhook: XML and JSON Examples. |
Example Response | See Enable/Disable a Webhook: XML and JSON Examples. |
Enable/Disable Webhooks: Payload Properties
Property | UI Field Name | Description |
|---|---|---|
| n/a | There are two attributes for this property:
For example: <webhook enable="true" name="test-1"></webhook> |
Enable/Disable a Webhook: XML and JSON Examples
- JSON
- XML
Example Request
[{
"enable": true,
"name": "test-1"
},
{
"enable": false,
"name": "test-3"
}]
Example Response
{
"type": "Enable/Disable Webhooks",
"success": true,
"info": "Successfully disabled Webhook \"test-3\"., Successfully enabled Webhook \"test-1\".",
"errors": ""
}
Example Request
<enable-disable-webhook>
<webhook enable="true" name="test-1"></webhook>
<webhook enable="false" name="test-3"></webhook>
</enable-disable-webhook>
Example Response
<command-response>
<type>Enable/Disable Webhooks</type>
<success>true</success>
<info>Successfully disabled Webhook "test-3"., Successfully enabled Webhook "test-1".</info>
<errors></errors>
</command-response>
List Webhooks
Description | |
|---|---|
URI | http://host_name/uc/resources/webhook/list |
HTTP Method | GET |
Description | List webhook registrations. |
Example URI | http://localhost:8080/uc/resources/webhook/list?webhookname= http://localhost:8080/uc/resources/webhook/list?action= http://localhost:8080/uc/resources/webhook/list?description= |
Authentication | HTTP Basic |
Produces Content-Type | application/xml, application/json |
Consumes Content-Type | n/a |
Example Responses | List Webhook: XML and JSON Examples. |
List Webhooks: Query Parameters
Property | UI Field Name | Description | Specifications | Required |
|---|---|---|---|---|
| Name | Name used within the Controller to identify this webhook. | String; URI parameter. | N |
| Description | User-defined; description of this record. | String; URI parameter. | N |
| Action | Type of Action. | String; URI parameter. | N |
| Member of Business Services | Business Services that this record belongs to. | String; URI parameter. | N |
| Event | Event name. | String; URI parameter. | N |
| Task | Task name. | String; URI parameter. | N |
| URL | URL. | String; URI parameter. | N |
List Webhooks: Example Response
- JSON
- XML
JSON
[
{
"action": "Url",
"credentials": "web-serv-1",
"description": null,
"disabledBy": "ops.admin",
"disabledTime": "2023-03-15 15:34:24 -0400",
"enabledBy": "",
"enabledTime": "",
"event": {
"label": "UAC - Agent Changed",
"value": "uac_agent_changed"
},
"eventBusinessServiceCriteria": "Member of Specific Business Services or Unassigned",
"eventBusinessServices": [
"X",
"Y",
"Z"
],
"executionUser": null,
"exportReleaseLevel": "8.0.0.0",
"exportTable": "ops_webhook",
"filter": {
"criteria": [
{
"type": "criterion",
"name": "name",
"operator": "CONTAINS",
"value": "test1"
}
],
"logicalOperator": "And"
},
"httpAuth": "Basic",
"httpHeaders": [
{
"name": "B",
"value": "123"
}
],
"name": "test-1",
"opswiseGroups": [
"A"
],
"status": "Disabled",
"statusDescription": "",
"sysId": "401b83365dcd48cf8a8518849dfb28c4",
"task": null,
"url": "test",
"urlParameters": [
{
"name": "A",
"value": "abc"
}
]
},
{
"action": "Url",
"credentials": "web-serv-1",
"description": null,
"disabledBy": "ops.admin",
"disabledTime": "2023-03-15 14:00:59 -0400",
"enabledBy": "",
"enabledTime": "",
"event": {
"label": "UAC - Agent Changed",
"value": "uac_agent_changed"
},
"eventBusinessServiceCriteria": "Member of Specific Business Services or Unassigned",
"eventBusinessServices": [
"X",
"Y",
"Z"
],
"executionUser": null,
"exportReleaseLevel": "8.0.0.0",
"exportTable": "ops_webhook",
"filter": {
"criteria": [
{
"type": "criterion",
"name": "name",
"operator": "CONTAINS",
"value": "test1"
}
],
"logicalOperator": "And"
},
"httpAuth": "Basic",
"httpHeaders": [
{
"name": "X",
"value": "123"
}
],
"name": "test-2",
"opswiseGroups": [],
"status": "Disabled",
"statusDescription": "",
"sysId": "bb0bf1ae08cb4ac3a8df69bc5548281c",
"task": null,
"url": "test",
"urlParameters": [
{
"name": "A",
"value": "abc"
}
]
}
]
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<webhooks>
<webhook exportReleaseLevel="8.0.0.0" exportTable="ops_webhook">
<action>Url</action>
<eventBusinessServiceCriteria>Member of Specific Business Services or Unassigned</eventBusinessServiceCriteria>
<eventBusinessServices>
<businessService>X</businessService>
<businessService>Y</businessService>
<businessService>Z</businessService>
</eventBusinessServices>
<credentials>web-serv-1</credentials>
<description />
<disabledBy>ops.admin</disabledBy>
<disabledTime>2023-03-15 15:34:24 -0400</disabledTime>
<enabledBy></enabledBy>
<enabledTime></enabledTime>
<event label="UAC - Agent Changed">uac_agent_changed</event>
<executionUser />
<filter>
<criterion>
<name>name</name>
<operator>CONTAINS</operator>
<value>test1</value>
</criterion>
<logicalOperator>And</logicalOperator>
</filter>
<httpAuth>Basic</httpAuth>
<httpHeaders>
<httpHeader>
<name>B</name>
<value>123</value>
</httpHeader>
</httpHeaders>
<name>test-1</name>
<opswiseGroups>
<opswiseGroup>A</opswiseGroup>
</opswiseGroups>
<status>Disabled</status>
<statusDescription></statusDescription>
<sysId>401b83365dcd48cf8a8518849dfb28c4</sysId>
<task />
<url>test</url>
<urlParameters>
<urlParameter>
<name>A</name>
<value>abc</value>
</urlParameter>
</urlParameters>
</webhook>
<webhook exportReleaseLevel="8.0.0.0" exportTable="ops_webhook">
<action>Url</action>
<eventBusinessServiceCriteria>Member of Specific Business Services or Unassigned</eventBusinessServiceCriteria>
<eventBusinessServices>
<businessService>X</businessService>
<businessService>Y</businessService>
<businessService>Z</businessService>
</eventBusinessServices>
<credentials>web-serv-1</credentials>
<description />
<disabledBy>ops.admin</disabledBy>
<disabledTime>2023-03-15 14:00:59 -0400</disabledTime>
<enabledBy></enabledBy>
<enabledTime></enabledTime>
<event label="UAC - Agent Changed">uac_agent_changed</event>
<executionUser />
<filter>
<criterion>
<name>name</name>
<operator>CONTAINS</operator>
<value>test1</value>
</criterion>
<logicalOperator>And</logicalOperator>
</filter>
<httpAuth>Basic</httpAuth>
<httpHeaders>
<httpHeader>
<name>X</name>
<value>123</value>
</httpHeader>
</httpHeaders>
<name>test-2</name>
<opswiseGroups/>
<status>Disabled</status>
<statusDescription></statusDescription>
<sysId>bb0bf1ae08cb4ac3a8df69bc5548281c</sysId>
<task />
<url>test</url>
<urlParameters>
<urlParameter>
<name>A</name>
<value>abc</value>
</urlParameter>
</urlParameters>
</webhook>
</webhooks>
Modify Webhooks
Description | |
|---|---|
URI | http://host_name/uc/resources/webhook |
HTTP Method | PUT |
Description | Modify a webhook. |
Example URI | |
Authentication | HTTP Basic |
Payload Properties | |
Produces Content-Type | application/xml, application/json |
Consumes Content-Type | application/xml, application/json |
Example Responses |
|
Modify Webhooks: Example Request
- JSON
- XML
JSON
{
"action": "Launch Task",
"description": "test 1",
"disabledBy": null,
"disabledTime": "",
"enabledBy": null,
"enabledTime": "",
"event": {
"label": "UAC - Property Changed",
"value": "uac_property_changed"
},
"eventBusinessServiceCriteria": "Member of Specific Business Services or Unassigned",
"eventBusinessServices": [
"X",
"Y",
"Z"
],
"executionUser": null,
"exportReleaseLevel": "8.0.0.0",
"exportTable": "ops_webhook",
"filter": {
"criteria": [
{
"type": "criterion",
"name": "name",
"operator": "CONTAINS",
"value": "Suspended"
}
],
"logicalOperator": "And"
},
"name": "test-1",
"opswiseGroups": [
"A",
"B"
],
"retainSysIds": true,
"status": null,
"sysId": "63eacfe0b0534768ab7b5bef49212276",
"task": "Sleep 0",
"url": null
}
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<webhook exportReleaseLevel="8.0.0.0" exportTable="ops_webhook" retainSysIds="true">
<action>Launch Task</action>
<eventBusinessServiceCriteria>Member of Specific Business Services or Unassigned</eventBusinessServiceCriteria>
<eventBusinessServices>
<businessService>X</businessService>
<businessService>Y</businessService>
<businessService>Z</businessService>
</eventBusinessServices>
<description>test 1</description>
<disabledBy />
<disabledTime></disabledTime>
<enabledBy />
<enabledTime></enabledTime>
<event label="UAC - Property Changed">uac_property_changed</event>
<executionUser />
<filter>
<criterion>
<name>name</name>
<operator>CONTAINS</operator>
<value>Suspended</value>
</criterion>
<logicalOperator>And</logicalOperator>
</filter>
<name>test-1</name>
<opswiseGroups>
<opswiseGroup>A</opswiseGroup>
<opswiseGroup>B</opswiseGroup>
</opswiseGroups>
<status />
<sysId>63eacfe0b0534768ab7b5bef49212276</sysId>
<task>Sleep 0</task>
<url />
</webhook>
Read a Webhook
Description | |
|---|---|
URI | http://host_name/uc/resources/webhook |
HTTP Method | GET |
Description | Read webhook registration. |
Example URI | |
Authentication | HTTP Basic |
Produces Content-Type | application/xml, application/json |
Consumes Content-Type | n/a |
Example Responses | See Read a Webhook: Example Response, below. |
Read a Webhook: Query Parameters
Property | UI Field Name | Description | Specifications | Required | Mutually Exclusive With |
|---|---|---|---|---|---|
| ID used within the Controller to identify this webhook. | String; URI parameter. | Y |
| |
| Name | Name used within the Controller to identify this webhook. | String; URI parameter. | Y |
|
Read a Webhook: Example Response
- JSON
- XML
JSON
{
"action": "Url",
"credentials": "web-serv-1",
"description": null,
"disabledBy": "ops.admin",
"disabledTime": "2023-03-15 15:34:24 -0400",
"enabledBy": "",
"enabledTime": "",
"event": {
"label": "UAC - Agent Changed",
"value": "uac_agent_changed"
},
"eventBusinessServiceCriteria": "Member of Specific Business Services or Unassigned",
"eventBusinessServices": [
"X",
"Y",
"Z"
],
"executionUser": null,
"exportReleaseLevel": "8.0.0.0",
"exportTable": "ops_webhook",
"filter": {
"criteria": [
{
"type": "criterion",
"name": "name",
"operator": "CONTAINS",
"value": "test1"
}
],
"logicalOperator": "And"
},
"httpAuth": "Basic",
"httpHeaders": [
{
"name": "B",
"value": "123"
}
],
"name": "test-1",
"opswiseGroups": [
"A"
],
"retainSysIds": true,
"status": "Disabled",
"statusDescription": "",
"sysId": "401b83365dcd48cf8a8518849dfb28c4",
"task": null,
"url": "test",
"urlParameters": [
{
"name": "A",
"value": "abc"
}
]
}
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<webhook exportReleaseLevel="8.0.0.0" exportTable="ops_webhook" retainSysIds="true">
<action>Url</action>
<eventBusinessServiceCriteria>Member of Specific Business Services or Unassigned</eventBusinessServiceCriteria>
<eventBusinessServices>
<businessService>X</businessService>
<businessService>Y</businessService>
<businessService>Z</businessService>
</eventBusinessServices>
<credentials>web-serv-1</credentials>
<description />
<disabledBy>ops.admin</disabledBy>
<disabledTime>2023-03-15 15:34:24 -0400</disabledTime>
<enabledBy></enabledBy>
<enabledTime></enabledTime>
<event label="UAC - Agent Changed">uac_agent_changed</event>
<executionUser />
<filter>
<criterion>
<name>name</name>
<operator>CONTAINS</operator>
<value>test1</value>
</criterion>
<logicalOperator>And</logicalOperator>
</filter>
<httpAuth>Basic</httpAuth>
<httpHeaders>
<httpHeader>
<name>B</name>
<value>123</value>
</httpHeader>
</httpHeaders>
<name>test-1</name>
<opswiseGroups>
<opswiseGroup>A</opswiseGroup>
</opswiseGroups>
<status>Disabled</status>
<statusDescription></statusDescription>
<sysId>401b83365dcd48cf8a8518849dfb28c4</sysId>
<task/>
<url>test</url>
<urlParameters>
<urlParameter>
<name>A</name>
<value>abc</value>
</urlParameter>
</urlParameters>
</webhook>
Register a Webhook
Description | |
|---|---|
URI | http://host_name/uc/resources/webhook |
HTTP Method | POST |
Description | Register a webhook. |
Example URI | |
Authentication | HTTP Basic |
Produces Content-Type | application/xml, application/json |
Consumes Content-Type | application/xml, application/json |
Example Request | See Register a Webhook: Example Request, below. |
Example Responses |
|
Register a Webhook: Payload Properties
Property | UI Field Name | Description | Specifications | Required |
|---|---|---|---|---|
| Webhook Name | Name of the Webhook. | Y | |
| Description | User-defined; description of this record. | N | |
| Member of Business Services | Business Services that this record belongs to. XML JSON | N | |
| n/a | Specification for whether or not the Create a Webhook web service will persist the sysId property.
Note In XML web services, | Valid values: true/false (default is true). | N |
| Action | Type of Action to perform | Valid Values:
Default is URL (1). | Y |
| Event | Universal Event Template name. XML JSON info Only system level event templates will be allowed. | The | Y |
| URL | If | Y (if | |
| Task | If | Y (if | |
| HTTP Authentication | HTTP authentication scheme to use. | Valid values:
Default is None (0). | N |
| Credentials | Credentials to be used to authenticate. | N | |
| HTTP Headers | HTTP headers. | Format: | N |
| URL Query Parameters | Any query parameters to be encoded as a query string and appended to the URL. | Format: | N |
| Event Attribute Criteria | Universal Event criteria to execute the Webhook. | N | |
| Event Business Service Criteria | Specifies the type of business service filtering to apply when monitoring on Universal Events. | Valid values (case-insensitive):
Default is Member of Any Business Service or Unassigned (1). | N |
| Event Member of Business Services | Specifies one or more business services to filter on when Event Business Service Criteria is one of the following.
| Format: XML JSON |
Register a Webhook: Example Request
- JSON
- XML
JSON
{
"action": "Url",
"credentials": "web-serv-1",
"description": null,
"disabledBy": "ops.admin",
"disabledTime": "2023-03-15 15:34:24 -0400",
"enabledBy": "",
"enabledTime": "",
"event": {
"label": "UAC - Agent Changed",
"value": "uac_agent_changed"
},
"eventBusinessServiceCriteria": "Member of Specific Business Services or Unassigned",
"eventBusinessServices": [
"X",
"Y",
"Z"
],
"executionUser": null,
"exportReleaseLevel": "8.0.0.0",
"exportTable": "ops_webhook",
"filter": {
"criteria": [
{
"type": "criterion",
"name": "name",
"operator": "CONTAINS",
"value": "test1"
}
],
"logicalOperator": "And"
},
"httpAuth": "Basic",
"httpHeaders": [
{
"name": "B",
"value": "123"
}
],
"name": "test-1",
"opswiseGroups": [
"A"
],
"retainSysIds": true,
"status": "Disabled",
"statusDescription": "",
"sysId": "401b83365dcd48cf8a8518849dfb28c4",
"task": null,
"url": "test",
"urlParameters": [
{
"name": "A",
"value": "abc"
}
]
}
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<webhook exportReleaseLevel="8.0.0.0" exportTable="ops_webhook" retainSysIds="true">
<action>Url</action>
<eventBusinessServiceCriteria>Member of Specific Business Services or Unassigned</eventBusinessServiceCriteria>
<eventBusinessServices>
<businessService>X</businessService>
<businessService>Y</businessService>
<businessService>Z</businessService>
</eventBusinessServices>
<credentials>web-serv-1</credentials>
<description />
<disabledBy>ops.admin</disabledBy>
<disabledTime>2023-03-15 15:34:24 -0400</disabledTime>
<enabledBy></enabledBy>
<enabledTime></enabledTime>
<event label="UAC - Agent Changed">uac_agent_changed</event>
<executionUser />
<filter>
<criterion>
<name>name</name>
<operator>CONTAINS</operator>
<value>test1</value>
</criterion>
<logicalOperator>And</logicalOperator>
</filter>
<httpAuth>Basic</httpAuth>
<httpHeaders>
<httpHeader>
<name>B</name>
<value>123</value>
</httpHeader>
</httpHeaders>
<name>test-1</name>
<opswiseGroups>
<opswiseGroup>A</opswiseGroup>
</opswiseGroups>
<status>Disabled</status>
<statusDescription></statusDescription>
<sysId>401b83365dcd48cf8a8518849dfb28c4</sysId>
<task/>
<url>test</url>
<urlParameters>
<urlParameter>
<name>A</name>
<value>abc</value>
</urlParameter>
</urlParameters>
</webhook>
Unassign an Execution User from a Webhook
Description | |
|---|---|
URI | http://host_name/uc/resources/webhook/unassignexecutionuser |
HTTP Method | POST |
Description | Unassigns an Execution User to the specified webhook. |
Example URI | http://localhost:8080/uc/resources/webhook/unassignexecutionuser?webhookid= http://localhost:8080/uc/resources/webhook/unassignExecutionUser?webhookname= |
Authentication | HTTP Basic |
Consumes Content-Type | application/xml, application/json |
Produces Content-Type | n/a |
Example Response |
|
Unassign an Execution User from a Webhook: Query Parameters
Property | UI Field Name | Description | Specifications | Required | Mutually Exclusive With |
|---|---|---|---|---|---|
| ID used within the Controller to identify this webhook. | String; URI parameter. | Y |
| |
| Name | Name used within the Controller to identify this webhook. | String; URI parameter. | Y |
|
Unregister a Webhook
Description | |
|---|---|
URI | http://host_name/uc/resources/webhook |
HTTP Method | DELETE |
Description | Unregister a webhook. |
Example URI | |
Authentication | HTTP Basic |
Example Responses | Webhook deleted successfully. |
Unregister a Webhook: Query Parameters
Property | UI Field Name | Description | Specifications | Required | Mutually Exclusive With |
|---|---|---|---|---|---|
| ID used within the Controller to identify this webhook. | String; URI parameter. | Y |
| |
| Name | Name used within the Controller to identify this webhook. | String; URI parameter. | Y |
|