nerdexam
CiscoCisco

300-435 · Question #156

300-435 Question #156: Real Exam Question with Answer & Explanation

The correct answer is B: networks/L_646829496481105433/bind. The Cisco Meraki API endpoint for binding a network to a configuration template follows the path pattern /networks/{networkId}/bind, using the network ID as the path parameter.

Controller-Based Network Automation

Question

Refer to the exhibit. An engineer must bind the network ENAUTO, which has the network ID L_646829496481105433, to a template by using Cisco Meraki APIs. Which code snippet must be added to the box in the code to complete the Python request? ```python import requests url = "https://api.meraki.com/api/v1/" payload = '''{ "configTemplateId": "N_23952905", "autoBind": false }''' headers = { "Content-Type": "application/json", "Accept": "application/json", "X-Cisco-Meraki-API-Key": "Gbec40cf957de430a6fff2012345678a4fac9ea0" } response = requests.request('POST', url, headers=headers, data = payload) print(response.text.encode('utf8')) ```

Options

  • AENAUTO/bind/N_23952905
  • Bnetworks/L_646829496481105433/bind
  • CPOST/L_646829496481105433/bind
  • Dnetworks/bind/N_23952905

Explanation

The Cisco Meraki API endpoint for binding a network to a configuration template follows the path pattern /networks/{networkId}/bind, using the network ID as the path parameter.

Common mistakes.

  • A. This incorrectly uses the network name ENAUTO and places the template ID in the URL path, neither of which matches the Meraki API URL structure.
  • C. Including the HTTP method (POST) in the URL path is invalid - methods are specified in the request call, not embedded in the URL.
  • D. This reverses the correct structure by placing bind before the template ID rather than after the network ID, and uses the template ID instead of the network ID.

Concept tested. Cisco Meraki API network bind endpoint URL construction

Reference. https://developer.cisco.com/meraki/api-v1/bind-network/

Topics

#Meraki API#Python Requests#REST API#Network Configuration

Community Discussion

No community discussion yet for this question.

Full 300-435 PracticeBrowse All 300-435 Questions