Versions Compared

Key

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


Panel

Table of Contents

...

Property

UI Field Name

Description

Specifications

Required

Mutually Exclusive With

webhookid


ID used within the Controller to identify this webhook.

String; URI parameter.

Y
(unless webhookname
is specified)

webhookname

webhookname

Name

Name used within the Controller to identify this webhook.

String; URI parameter.

Y
(unless webhookid
is specified)

webhookid

Anchor
enable
enable

Enable a Webhook


 Description

URI

http://host_name/uc/resources/webhook/enable


HTTP Method

POST

Description

Enables a webhook.

Example URI

http://localhost:8080/uc/resources/webhook/enable

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

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

...


XMLJSON
Example Request


Code Block
languagetext
<enable-disable-webhook>
    <webhook enable="true" name="test-1"></webhook>
    <webhook enable="false" name="test-3"></webhook>
</enable-disable-webhook> 



Code Block
languagetext
 [{
     "enable": true,
     "name": "test-1"
  },
  {
     "enable": false,
     "name": "test-3"
  }]


Example Response


Code Block
languagetext
<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>



Code Block
languagetext
{
    "type": "Enable/Disable Webhooks",
    "success": true,
    "info": "Successfully disabled Webhook \"test-3\"., Successfully enabled Webhook \"test-1\".",
    "errors": ""
}


Anchor
list
list

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.

...

XMLJSON


Expand
titleXML


Code Block
languagetext
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<webhook exportReleaseLevel="7.4.0.0" exportTable="ops_webhook" retainSysIds="true">
    <action>Launch Task</action>
    <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>




Expand
titleJSON


Code Block
languagetext
{
    "action": "Launch Task",
    "description": "test 1",
    "disabledBy": null,
    "disabledTime": "",
    "enabledBy": null,
    "enabledTime": "",
    "event": {
        "label": "UAC - Property Changed",
        "value": "uac_property_changed"
    },
    "executionUser": null,
    "exportReleaseLevel": "7.4.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
}



Anchor
read
read

Read a Webhook


 Description

URI

http://host_name/uc/resources/webhook

HTTP Method

GET

Description

Read webhook registration.

Example URI

http://localhost:8080/uc/resources/webhook?webhookid=

http://localhost:8080/uc/resources/webhook?webhookname=

Authentication

HTTP Basic

Produces Content-Type

n/a

Consumes Content-Type

application/xml, application/json

Example Responses

Read Webhook: XML and JSON Examples, below. 

Anchor
query parameters
query parameters

Read a Webhook: Query Parameters 

Property

UI Field Name

Description

Specifications

Required

Mutually Exclusive With

webhookid


ID used within the Controller to identify this webhook.

String; URI parameter.

Y
(unless webhookname
is specified)

webhookname

webhookname

 Name

Name used within the Controller to identify this webhook.

String; URI parameter.

Y
(unless webhookid
is specified)

webhookid

...

XMLJSON


Expand
titleXML


Code Block
languagetext
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<webhook exportReleaseLevel="7.4.0.0" exportTable="ops_webhook" retainSysIds="true">
    <action>Url</action>
    <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>




Expand
titleJSON


Code Block
languagetext
{
    "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"
    },
    "executionUser": null,
    "exportReleaseLevel": "7.4.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"
        }
    ]
}



Anchor
register
register

Register a Webhook 


 Description

URI

http://host_name/uc/resources/webhook

HTTP Method

POST

Description

Register a webhook.

Example URI

http://localhost:8080/uc/resources/webhook

Authentication

HTTP Basic

Produces Content-Type

application/xml, application/json

Consumes Content-Type

application/xml, application/json

Example RequestSee Register a Webhook: Example Request, below. 

Example Responses

  • Status 200

    • Successfully created the webhook with id {uuid}.

  • Status 400

    • Error message.

  • Status 403

    • Operation prohibited due to security constraints.

  • Status 404

    • A webhook with name “{name}” does not exist.

    • A webhook with id "{uuid}" does not exist.

  • Status 500

    • Unexpected request failure. See log(s) for more details.

...

XML RequestJSON Request


Expand
titleXML


Code Block
languagetext
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<webhook exportReleaseLevel="7.4.0.0" exportTable="ops_webhook" retainSysIds="true">
    <action>Url</action>
    <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>




Expand
titleJSON


Code Block
languagetext
{
    "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"
    },
    "executionUser": null,
    "exportReleaseLevel": "7.4.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"
        }
    ]
}



Anchor
unassign
unassign

Unassign an Execution User from a Webhook

...