300-435 · Question #134
Drag and drop the code from the bottom onto the boxes in the Python script to create a Cisco Meraki network. Not all options are used.
The user must correctly drag and drop code snippets to complete a curl command that creates a Cisco Meraki network, demonstrating knowledge of RESTful API principles, HTTP methods, and Meraki API structure.
Question
Exhibit
Explanation
The user must correctly drag and drop code snippets to complete a curl command that creates a Cisco Meraki network, demonstrating knowledge of RESTful API principles, HTTP methods, and Meraki API structure.
Approach. To correctly create a Cisco Meraki network using the curl command provided, the following interactions are required:
- Drag 'POST' to the first blank box next to
--request. This specifies the HTTP method. 'POST' is used for creating new resources. - Drag 'organizations' to the second blank box after
api/v0/. The Meraki API structure for network creation typically starts with/organizationsto specify the organization context. - Drag 'networks' to the third blank box after
{organizationId}/. To create a network within a specific organization, the endpoint isorganizations/{organizationId}/networks. - Drag 'Key' to the fourth blank box after
X-Cisco-Meraki-API-. The authentication header for Cisco Meraki APIs isX-Cisco-Meraki-API-Key. The--datablock, which includes 'name' and 'type', confirms that a new resource (a network in this context) is being created, aligning with the use of thePOSTmethod and the/networksendpoint.
Common mistakes.
- common_mistake. 1. Using 'GET' instead of 'POST': 'GET' is used to retrieve data, not to create new resources. Since the command includes a
--datapayload for 'name' and 'type', it's clearly for creation, which requires 'POST'.
- Incorrect API endpoint path: Placing 'devices' where 'organizations' or 'networks' should be would lead to an incorrect API call. 'organizations' is the top-level resource for managing organizations, and 'networks' is the specific resource under an organization for creating networks. 'devices' would be used to manage devices within a network.
- Missing or incorrect API authentication header: Failing to include 'Key' in the
X-Cisco-Meraki-API-header would result in an unauthorized API call, as Meraki APIs require an API key for authentication.
Concept tested. This question tests the candidate's understanding of RESTful API concepts, specifically interacting with a Cisco Meraki API using curl. Key concepts include: HTTP methods (POST for creation), API endpoint structure (resource hierarchy), and API authentication mechanisms (custom headers like X-Cisco-Meraki-API-Key).
Topics
Community Discussion
No community discussion yet for this question.
