Summary:
Inspect or delete a custom webhook rule.
URL:
http(s)://{server hostname}/api/webhooks/rules/{rule id}
Methods summary
- GET Method - inspect a custom webhook rule
- DELETE Method - delete a custom webhook rule
GET Method detail
Response:
Name | Description |
---|---|
ruleName | name of the rule. |
groupID | id of the webhook group to which this rule will apply. |
conditions | set of conditions that determine whether the webhook payload meets the requirements for raising a webhook event. |
fieldToTest | key from which the value will be retrieved. |
valueToMatch | value to compare to the value from the payload. |
operator | operation that the value will use. |
transformType |
type into which the value will be converted, from the following:
|
eventMapping | set of parameters by which to map the webhook event. |
eventSource | informational entry of the event source. |
eventDetails | informational entry of the event details |
eventName | name of the custom webhook event. |
eventDescr | description of the event. This is informational only. |
eventSeverity |
severity of the event, select from: 2 - Info 4 - Minor 6 - Major 8 - Severe 10 - Critical |
Example:
INPUT
curl -u admin:admin https://localhost/api/webhooks/rules/11 -H "content-type:application/json"
OUTPUT
{
"ruleID" : 11,
"ruleName" : "Meraki Device Up Rule",
"groupID" : 23,
"conditions" : [ {
"eventConditionID" : 9,
"fieldToTest" : "${deviceName}",
"valueToMatch" : "My AP.*",
"operator" : "LIKE",
"transformType" : "STRING",
"result" : false
} ],
"eventMapping" : {
"eventMappingID" : 8,
"eventSource" : "${deviceName} on ${networkName} ",
"eventDetails" : "${deviceModel} ",
"webhookEvent" : {
"eventName" : "Meraki Device Came Up",
"eventDescription" : "Test Meraki Device Came Up Event",
"eventID" : 8,
"eventSeverity" : 6
},
"eventName" : "Meraki Device Came Up",
"eventID" : 8
},
"enabled" : 1,
"payloadID" : 15
}
DELETE Method detail
Deletes the specified custom webhook rule using its ruleID.
Response:
Indicates success or failure of deletion.
Example:
INPUT
curl -u admin:admin https://localhost/api/webhooks/rules/13 -X DELETE -H "content-type:application/json"
OUTPUT
{
"successCount" : 1,
"failureCount" : 0,
"errorCode" : 0,
"message" : "Successfully deleted 1 rules.",
"otherResults" : [ ]
}
Comments
0 comments
Please sign in to leave a comment.