300-435 · Question #155
Drag and drop the code snippets from the bottom onto the boxes in the code to implement a HTTP receiver in Python to handle incoming events from Cisco Meraki webhooks. Not all options are used.
This question tests the ability to construct a Python Flask-based HTTP receiver that listens for and processes incoming JSON webhook POST requests from Cisco Meraki. The developer must correctly assemble route decoration, HTTP method filtering, and JSON body parsing.
Question
Explanation
This question tests the ability to construct a Python Flask-based HTTP receiver that listens for and processes incoming JSON webhook POST requests from Cisco Meraki. The developer must correctly assemble route decoration, HTTP method filtering, and JSON body parsing.
Approach. A Cisco Meraki webhook receiver must use a web framework (typically Flask) to expose an HTTP endpoint that accepts POST requests, because Meraki sends event data as JSON payloads via HTTP POST to a pre-configured URL. The correct skeleton initializes a Flask app, applies the @app.route() decorator with methods=['POST'] on the handler function, extracts the body using request.json (or request.get_json()), and returns an HTTP 200 response to acknowledge receipt. Missing any of these elements - wrong HTTP method, missing JSON parse, or no acknowledgment response - would cause Meraki to retry or flag delivery failures.
Concept tested. Implementing a Python Flask HTTP webhook receiver for Cisco Meraki: correct use of @app.route with POST method, JSON payload extraction via request.json, and returning a 200 OK acknowledgment - core to Cisco DevNet Associate/Professional webhook integration objectives.
Reference. Cisco Meraki Developer Documentation - Webhooks: https://developer.cisco.com/meraki/webhooks/
Topics
Community Discussion
No community discussion yet for this question.