DevNet Associate (DEVASC) v1.0Understanding and Using APIsEasy
A network administrator is configuring a real-time monitoring system. This system needs to be notified immediately whenever a critical event (e.g., interface status change, high CPU utilization) occurs on a Cisco router. The existing API on the router supports a mechanism where the router can proactively send HTTP POST requests to a pre-configured URL whenever such an event happens. What is this mechanism called?
- ARESTful API Call
- BWebhook
- CPolling
- DLong Polling
Show answer & explanationAnswer & explanation
Correct answer: B. Webhook
A webhook is an automated message sent from an application when a certain event occurs. It's a method of providing real-time information to other applications by pushing data to a pre-configured URL, rather than requiring the client to repeatedly request (poll) for updates.
Why the other options are wrong
- A. A RESTful API Call is a general term for interacting with a REST API; it doesn't specifically describe the server proactively sending data on event.
- C. Polling involves the client repeatedly sending requests to the server to check for updates, which is inefficient for real-time events.
- D. Long polling is a variation of polling where the server holds a request open until new data is available or a timeout occurs, still client-initiated.
Webhook
An HTTP callback: an automated message sent from an application when a specific event occurs, delivering real-time data to a pre-configured URL.
- Enables real-time event notifications without constant polling.
- Typically uses HTTP POST requests to deliver payload data.
- Requires the receiving application to expose an endpoint to listen for webhooks.
Memory trick: Instead of asking 'Is it here?', the system just rings a bell when it arrives.