{"id":13787384,"url":"https://github.com/cisco-en-programmability/dnacenter_webhook_receiver","last_synced_at":"2026-01-16T16:49:54.858Z","repository":{"id":98858254,"uuid":"236380589","full_name":"cisco-en-programmability/dnacenter_webhook_receiver","owner":"cisco-en-programmability","description":"Sample code for a Cisco DNA Center Webhook Receiver","archived":false,"fork":false,"pushed_at":"2023-04-12T17:52:20.000Z","size":392,"stargazers_count":14,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-18T00:37:24.125Z","etag":null,"topics":["cisco-dna-center","flask","notifications","python","webhooks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cisco-en-programmability.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-26T21:45:07.000Z","updated_at":"2024-03-29T08:54:22.000Z","dependencies_parsed_at":"2023-05-25T21:45:14.277Z","dependency_job_id":null,"html_url":"https://github.com/cisco-en-programmability/dnacenter_webhook_receiver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacenter_webhook_receiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacenter_webhook_receiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacenter_webhook_receiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacenter_webhook_receiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cisco-en-programmability","download_url":"https://codeload.github.com/cisco-en-programmability/dnacenter_webhook_receiver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253655798,"owners_count":21943068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cisco-dna-center","flask","notifications","python","webhooks"],"created_at":"2024-08-03T20:00:33.517Z","updated_at":"2026-01-16T16:49:54.847Z","avatar_url":"https://github.com/cisco-en-programmability.png","language":"Python","funding_links":[],"categories":["Assurance"],"sub_categories":[],"readme":"\n# Cisco DNA Center Webhook Receiver\n\nThis repo is for a simple Flask application that will receive webhooks notifications. \nThis app is to be used only in demo or lab environments, it is not written for production. Please follow these\n recommendations for production deployments: https://flask.palletsprojects.com/en/1.1.x/deploying/.\n\nThe \"flask_receiver.py\" will save the notification to a file, and it will not process the notification.\n\nUsers my continue the development of this application to parse the received event notification and take the next\n steps based on their use case.\n\n**Cisco Products \u0026 Services:**\n\n- Cisco DNA Center\n\n**Tools \u0026 Frameworks:**\n\n- Python environment to run the Flask App as a Webhook Receiver\n\n**Usage**\n\n - Create a new Flask App to receive Cisco DNA Center notifications\n - \"flask_receiver.py\" - webhook receiver \n - \"config.py\" - configure your lab environment\n - \"test_webhook_receiver\" - app to test the webhook receiver without Cisco DNA Center\n - The notifications received will be saved to the file \"all_webhooks_detailed.log\"\n - Start the Flask App\n - Test by browsing to your receiver home page\n - Configure Cisco DNA Center Webhooks to send notifications to your new receiver\n - Trigger events for the configured webhooks\n - Verify the events are received by the webhook receiver\n\nCisco DNA Center Webhook Destination configuration using HTTP Basic Auth: \n\n\u003cimg src=\"https://github.com/cisco-en-programmability/dnacenter_webhook_receiver/blob/master/Webhook_Destination.png\" width=\"400\" /\u003e\n\n**Sample Output**\n   - from \"test_webhook_receiver.py\":\n   \n      Webhook notification status code:  202\n\n      Webhook notification response:  Webhook notification received\n   \n   - from \"flask_receiver.py\":\n        ```python\n        WARNING: This is a development server. Do not use it in a production deployment.\n           Use a production WSGI server instead.\n         * Debug mode: on\n         * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n         * Restarting with stat\n         * Debugger is active!\n         * Debugger PIN: 764-976-195\n        127.0.0.1 - - [17/Nov/2020 13:52:42] \"POST /webhook HTTP/1.1\" 202 -\n        Webhook Received\n        Payload: \n        {\n            \"version\" : \"\" , \n            \"instanceId\" : \"ea6e28c5-b7f2-43a4-9937-def73771c5ef\" , \n            \"eventId\" : \"NETWORK-NON-FABRIC_WIRED-1-251\" , \n            \"namespace\" : \"ASSURANCE\" , \n            \"name\" : \"\" , \n            \"description\" : \"\" , \n            \"type\" : \"NETWORK\" , \n            \"category\" : \"ALERT\" , \n            \"domain\" : \"Connectivity\" , \n            \"subDomain\" : \"Non-Fabric Wired\" , \n            \"severity\" : 1 , \n            \"source\" : \"ndp\" , \n            \"timestamp\" : 1574457834497 , \n            \"tags\" : \"\" , \n            \"details\" : {\n                \"Type\" : \"Network Device\" , \n                \"Assurance Issue Priority\" : \"P1\" , \n                \"Assurance Issue Details\" : \"Interface GigabitEthernet1/0/3 on the following network device is down: Local Node: PDX-M\" , \n                \"Device\" : \"10.93.141.17\" , \n                \"Assurance Issue Name\" : \"Interface GigabitEthernet1/0/3 is Down on Network Device 10.93.141.17\" , \n                \"Assurance Issue Category\" : \"Connectivity\" , \n                \"Assurance Issue Status\" : \"active\"\n            } , \n            \"ciscoDnaEventLink\" : \"https://10.93.141.35/dna/assurance/issueDetails?issueId=ea6e28c5-b7f2-43a4-9937-def73771c5ef\" , \n            \"note\" : \"To programmatically get more info see here - https://\u003cip-address\u003e/dna/platform/app/consumer-portal/developer-toolkit/apis?apiId=8684-39bb-4e89-a6e4\" , \n            \"tntId\" : \"\" , \n            \"context\" : \"\" , \n            \"tenantId\" : \"\"\n        }\n```\n\n \n This sample code is for proof of concepts and labs\n\n**License**\n\nThis project is licensed to you under the terms of the [Cisco Sample Code License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-en-programmability%2Fdnacenter_webhook_receiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcisco-en-programmability%2Fdnacenter_webhook_receiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-en-programmability%2Fdnacenter_webhook_receiver/lists"}