nerdexam
Cisco

300-435 · Question #113

Refer to the exhibit. A network engineer must create a script that provides an alert every time a switch power supply fails in the network. To perform this task, the network engineer is using Cisco…

The correct answer is B. "method": "POST". When configuring a webhook endpoint for Cisco Catalyst Center (DNA Center) event subscriptions, the HTTP method for the webhook callback is specified using the "method" key within the subscriptionDetails object.

Controller-Based Network Automation

Question

Refer to the exhibit. A network engineer must create a script that provides an alert every time a switch power supply fails in the network. To perform this task, the network engineer is using Cisco Catalyst Center (formerly DNA Center) event webhooks in a Python script. Which code snippet must be added to the box in the code to subscribe to the event?
payload = {
 "name": "Webhook for power supply failure",
 "description": "Power supply failure on switch",
 "subscriptionEndpoints": [
 {
 "instanceId": INSTANCEID,
 "subscriptionDetails": {
 "connectorType": "REST",
 // MISSING LINE HERE
 }
 }
 ],
 "filter": {
 "eventIds": [
 "NETWORK-DEVICES-2-201"
 ]
 }
}

Options

  • A"connectorMethod": "POST"
  • B"method": "POST"
  • C"subscribeTo":"POST"
  • D"connector": "POST"

How the community answered

(19 responses)
  • B
    95% (18)
  • D
    5% (1)

Why each option

When configuring a webhook endpoint for Cisco Catalyst Center (DNA Center) event subscriptions, the HTTP method for the webhook callback is specified using the "method" key within the `subscriptionDetails` object.

A"connectorMethod": "POST"

"connectorMethod" is not the correct or standard key for specifying the HTTP method within the `subscriptionDetails` of a DNA Center webhook event subscription.

B"method": "POST"Correct

Within the `subscriptionDetails` object for a REST connector type, the `method` key is used to specify the HTTP method (e.g., "POST", "PUT") that Cisco Catalyst Center should use when sending the event notification to the configured URL. This defines how the external endpoint expects to receive the event data.

C"subscribeTo":"POST"

"subscribeTo" is not the correct key for defining the HTTP method for a webhook event notification in Cisco Catalyst Center's API.

D"connector": "POST"

"connector" is not the correct key to specify the HTTP method; "connectorType" is used for the type, but "method" specifies the HTTP action.

Concept tested: Cisco Catalyst Center event subscription webhook configuration

Source: https://developer.cisco.com/docs/dna-center/#!create-an-event-subscription

Topics

#Cisco Catalyst Center#Webhooks#API Integration#Event Subscription

Community Discussion

No community discussion yet for this question.

Full 300-435 Practice