300-435 Question 308
Single answerYou are tasked with creating a new network in a Cisco Meraki organization using the Meraki Dashboard API. The organization ID is already known, and you want to create a network with the name 'Branch-Office1', using the 'appliance' and 'switch' product types. Which API endpoint and request payload should you use to achieve this?
- A
POST /organizations/{organizationId}/networks with payload: {"name": "Branch-Office1", "type": "appliance", "tags": ["switch"]}
- B
POST /organizations/{organizationId}/networks with payload: {"name": "Branch-Office1", "productTypes": ["appliance", "switch"]}
- C
POST /networks/{networkId}/products with payload: {"name": "Branch-Office1", "productTypes": ["appliance", "switch"]}
- D
POST /organizations/{organizationId}/createNetwork with payload: {"name": "Branch-Office1", "productTypes": ["appliance", "switch"]}
Show answer and explanation
Correct answer: B
Explanation
To create a network using Cisco Meraki APIs, you must use the endpoint 'POST /organizations/{organizationId}/networks' and include the 'name' and 'productTypes' fields in the payload. The 'productTypes' field is required to specify which Meraki products (e.g., appliance, switch) the network will support. Other endpoints or incorrect payload structures will not work for this operation.
- A. Incorrect.
This option is incorrect because 'type' is not a valid field in the payload for this operation, and 'tags' does not specify product types.
- B. Correct.
This is the correct answer because it uses the correct API endpoint and specifies the 'productTypes' field to define the products included in the network.
- C. Incorrect.
This option is incorrect because the endpoint '/networks/{networkId}/products' is not used for creating networks; it is used for managing products within an already existing network.
- D. Incorrect.
This option is incorrect because '/organizations/{organizationId}/createNetwork' is not a valid Cisco Meraki API endpoint.