Cisco
300-435 · Question #114
Refer to the exhibit. An engineer must create a network Fabric using the Cisco Catalyst Center (formerly DNA Center) API. Which line of code completes the code snippet? ``python import requests from r
Sign in or unlock 300-435 to reveal the answer and full explanation for question #114. The question stem and answer options stay visible for context.
Controller-Based Network Automation
Question
Refer to the exhibit. An engineer must create a network Fabric using the Cisco Catalyst Center (formerly DNA Center) API. Which line of code completes the code snippet?
import requests
from requests.auth import HTTPBasicAuth
import urllib3
BASE_URL = 'https://<CIP Address>'
AUTH_URL = '/dna/system/api/v1/auth/token'
USERNAME = '<USERNAME>'
PASSWORD = '<PASSWORD>'
response = requests.post(BASE_URL + AUTH_URL, auth=HTTPBasicAuth(USERNAME, PASSWORD), verify=False)
token = response.json()['Token']
headers = {'Content-Type': 'application/json', 'X-Auth-Token': token}
SDA_FABRIC_URL = '/dna/intent/api/v1/business/sda/fabric'
# MISSING LINE HERE
response = requests.post(BASE_URL + SDA_FABRIC_URL, headers=headers, json=sda_fabric_info, verify=False)
Exhibits
Options
- Asda_fabric_info = {"fabricName":"DNAC_Guide_Fabric"}
- Bsda_fabric_info = {"DNAC_Guide_Fabric"}
- Csda_fabric_info = {"fabricName": "DNAC_Guide_Fabric"}
- Dsda_fabric_info = {"fabricName": "DNAC_Guide_Fabric"}
Unlock 300-435 to see the answer
You've previewed enough free 300-435 questions. Unlock 300-435 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#Cisco Catalyst Center API#REST API#Python requests#JSON payload

