QuestionQ8

Controller-Based Network Automation

Refer to the exhibit. An engineer needs to complete a Python script that creates a Cisco Meraki network containing cameras and switches. The script must apply appropriate tags and print a response when network creation is permitted. Drag the code snippets into the boxes in the Python script to create the Meraki network. Not all options are used.

Question Image

Drag & Drop
url = f"{Base_URL}organizations/{Org_ID}/networks"

body = {
    "name": "SalesDept",
    "timeZone": "America/Denver",
    "": [
        "apps",
        "cameras"
    ],
    "": [
        "switch",
        "camera"
    ]
}

response = requests.request("", url, headers=headers, json=body)
if response.status_code != :
    print(json.dumps(response.json(), indent=2))
else:
    print("Forbidden!")
Explanation

Cisco Meraki creates an organization network with POST to /organizations/{organizationId}/networks. The body uses productTypes to enable product families and tags to assign tags. A successful create response is HTTP 201 (Created); HTTP 403 represents a forbidden request.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!