This is a collection of Meraki Webhook Payload Templates.
Each folder consists of one integration which includes a couple of key files.
-
/integration/
-
readme.md
Description of the template, links to the related API service and screenshots of results.
-
body.liquid
The body template file
-
headers.liquid
The headers template file
-
The template files will leverage the Liquid language and render the final results based on the alertType
that is sent via the webhook.
alertTypes.json
Included sample of alert types and the variables that are available to the template.
The Liquid template language provides a number of options to present and transform the data. For more information and helpful tools, checkout these resources.
In addition to the standard Liquid filters, Meraki has provided a few extras for helpful tasks. Use these by appending a pipe and the name of the filter
alertData | jsonify
Converts a JSON object into a JSON string.
Hint, if you see [Object object] try using this
alertData | jsonify
--- Returns ---
{"portNum":3,"description":"Gigabit link negotiation failed","status":"10 Gbps","prevStatus":"100 Gbps","portDesc":"Corp Access"}
Converts a JSON object into a markdown friendly view of the keys and values and avoids clashing when nested in other JSON.
alertData | json_markdown
--- Returns ---
portNum: 3
description: Gigabit link negotiation failed
status: 10 Gbps
prevStatus: 100 Gbps
portDesc: Corp Access
Using the Dashboard API, the templates can be uploaded, managed, tested and applied.
get | /networks/{networkId}/webhooks/payloadTemplates | getNetworkWebhooksPayloadTemplates |
post | /networks/{networkId}/webhooks/payloadTemplates | createNetworkWebhooksPayloadTemplate |
get | /networks/{networkId}/webhooks/payloadTemplates/{payloadTemplateId} | getNetworkWebhooksPayloadTemplate |
delete | /networks/{networkId}/webhooks/payloadTemplates/{payloadTemplateId} | deleteNetworkWebhooksPayloadTemplate |
put | /networks/{networkId}/webhooks/payloadTemplates/{payloadTemplateId} | updateNetworkWebhooksPayloadTemplate |
post | /networks/{networkId}/webhooks/webhookTests | createNetworkWebhooksWebhookTest |
get | /networks/{networkId}/webhooks/webhookTests/{webhookTestId} | getNetworkWebhooksWebhookTest |
get | /networks/{networkId}/webhooks/httpServers | getNetworkWebhooksHttpServers |
post | /networks/{networkId}/webhooks/httpServers | createNetworkWebhooksHttpServer |
get | /networks/{networkId}/webhooks/httpServers/{httpServerId} | getNetworkWebhooksHttpServer |
put | /networks/{networkId}/webhooks/httpServers/{httpServerId} | updateNetworkWebhooksHttpServer |
delete | /networks/{networkId}/webhooks/httpServers/{httpServerId} | deleteNetworkWebhooksHttpServer |
A graphical web app to build and test template files.
-
Webhooks Management.postman_collection.json
A postman collection for the related Meraki API operations to manage webhooks is included in this folder.
node-red-webhook-payload.flows.json
A Node-RED flow to help test and manage payload templates
-
CRUD_Webhooks.py
A python script to manage payload templates in a Meraki organizationNavigate into the integration directory, then run the python script (from its relative directory).
cd webex ../CRUD_Webhook.py
./(((((((((((((((((/. *((((((((((((((((((((((((((((( .(((((((((((((((((((((((((((((((((((/ ((((((((((((((((((((((((((((((((((((((((/ ,(((((((((((((((((((((((((((((((((((((((((((( .(((((((((((((((((((( ((((((/ ((((((((((, (((((((((((((((((((((( ((((((/ ((((((((((( /(((((((((((((((((((((((((((((((((((((((((((((((((((( ((((((((((((((((((((((((((((((((((((((((((((((((((((((* (((((((((((((((((((((((((((((((((((((((((((((((((((((((( ((((((((((((((((((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((( ((((((((((((((/ ((((((((( ,(((((((((((((((((((((((( ((((((((((((((/ ((((((((/ ((((((((((((((((((((((((( .//////////////* .(((((((( ,(((((((((((((((((((((((((((((/ ((((((((((((. ((((((((((((((((((((((((((((((/ ((((((((((( (((((((((((((((((((((((((((((((((((((((((((((((((((((((* .(((((((((((((((((((((((((((((((((((((((((((((((((((((* /((((((((((((((((((((((((((((((((((((((((((((((((((* (((((((((((((((((((((((((((((((((((((((((((((((* (((((((((((/. .... (((((((/ ((((( ((( /. Welcome to the power of the Meraki API This is a demo on how to manage custom Webhook-payloadTemplates If you like to upload your custom Webhook-payloadTemplate, the headers.liquid and body.liquid file needs to be in the same dir as this script. The use of this tool is on your own risk. Please visit: https://meraki.io Press Enter to continue ```