Question 23 of 100 from exam 350-901-DEVCOR: Developing Applications Using Cisco Core Platforms and APIs

Question 23 of 100 from exam 350-901-DEVCOR: Developing Applications Using Cisco Core Platforms and APIs

Question

DRAG DROP -

elaiy /dna/intent/api/vi/wireless/profile Get Wireless Profile

Gets either one or all the wireless network profiles if no name is provided for network-profile.

Parameters

Name Description

profileName Default value:
string

Responses

Code _ Description

200

The request was successful. The result is contained in the response body.

Example Value Model

C
{
“profileDetails”: {
“name”: “string”,
“sites”: [
“string”
1,
“ssidDetails”: [
{
“name”: “string”,
type”: “Guest”,
“enabledFabric”: true,
“flexConnect”: {
“enableFlexConnect”: true,
“localTovian”: 0
y,
“InterfaceName”: “string”
import requests, json
ldef get_dnac_wireless_profiles():
try:
url = “https: //sandboxdnac2.cisco.com/dna/intent/api/v1” \
+ “/wireless/profile?//iltemill|-ChicagoCampus |”

payload = {}
headers = { ‘x-auth-token’: token }

response = requests.request("GET”, url, headers=headers, data = payload)
response.raise for status ()

return response. json() [0] [\ "TE. ‘1\
[ JC "Tey "]

except Exception as e:
print (e)

def create_dnac_token():

try:
url = “https: //sandboxdnac2 .cisco.com/dna/system/api/v1/auth/token”
payload = {}
headers = { ‘Authorization’: ‘Basic ZGV2bmV0dXNlcjpDaXNjbzEyMyE= ‘,

‘Content-Type’: ‘application/json’ }

response = requests.request(“POST”, url, headers-headers, data = payload)
response.raise_ for_status()
return response. json() [“foken’”]

except Exception as e:
print (e)

if name. == main”:
token = create_dnac_token()
print (get_dnac wireless profiles())

Refer to the exhibit.

The Python script is supposed to make an API call to Cisco DNA Center querying a wireless profile for the 'ChicagoCampus' and then parsing out its enable FlexConnect value.

Drag and drop the parts of the Python code from the left onto the item numbers on the right that match the missing sections in the exhibit.

Select and Place:

Answer Area

0 <item 1>
ssidDetails <item 2>
profileDetails <item 3>
profileName <item 4>
flexConnect <item 5>

enableFlexConnect

<item 6>

Explanations

Answer Area

profileName

ssidDetails

ssidDetails

profileDetails

profileDetails

profileName 0
flexConnect flexConnect
enableFlexConnect enableFlexConnect