350-901 · Question #72
350-901 Question #72: Real Exam Question with Answer & Explanation
The completed Python code with the missing sections filled in, based on standard Meraki API usage and inferred options (e.g., from Page 3 of the source for Item 4-7, and path components for Item 1-3) is: ``python def set_ssid_settings(network_id, wireless_name, wireless_password)
Question
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 to enable an SSID. Not all code parts are used. The missing parts correspond to the numbers Item 1 through Item 7 in the code snippet.
Explanation
The completed Python code with the missing sections filled in, based on standard Meraki API usage and inferred options (e.g., from Page 3 of the source for Item 4-7, and path components for Item 1-3) is:
def set_ssid_settings(network_id, wireless_name, wireless_password):
"""Configure an SSID to use the External Captive Portal."""
base_url = "https://api.meraki.com/api/v0/"
response = requests.put(
# Interpretation for URL path: base_url + "Item 1" + "Item 2" + "/Item 3/0"
# To form: base_url + "/networks/{network_id}/ssids/0"
# Assuming Item 1, Item 2, Item 3 are intended to form path segments, where:
# Item 1 corresponds to "networks", Item 2 to the variable 'network_id', and Item 3 to "ssids".
# The code snippet's concatenation `"Item 1" + "Item 2"` implies string literals, but for correct path, `network_id` must be a variable.
# The explanation assumes the intent is to construct the correct API URL dynamically.
base_url + f"networks/{network_id}/ssids/0", # Item 1='networks', Item 2=network_id (variable), Item 3='ssids'
headers={
"X-Cisco-Meraki-API-Key": MERAKI_API_KEY,
"Content-Type": "application/json"
},
json={
"number": 0,
"name": wireless_name,
"enabled": True,
"splashPage": "Click-through splash page", # Item 4
"ssidAdminAccessible": False,
"authMode": "psk", # Item 5
"psk": wireless_password,
"encryptionMode": "wpa",
"wpaEncryptionMode": "WPA2 only",
"ipAssignmentMode": "Bridge mode",
"useVlanTagging": False,
"walledGardenEnabled": True,
"walledGardenRanges": "192.168.0.1/32", # Item 6 (inferred from available options on page 3/4)
"minBitrate": 11,
"bandSelection": "5 GHz band only", # Item 7
"perClientBandwidthLimitUp": 0,
"perClientBandwidthLimitDown": 0
}
)
response.raise_for_status()
Note: The exact phrasing and formatting of the URL path placeholders and their corresponding options from external pages introduce some ambiguity, requiring interpretation for a fully functional solution.
Topics
Community Discussion
No community discussion yet for this question.