300-435 · Question #41
Which URI with the request body of Request body: {"name":"Test","organizationId":"<org_id>","type":"appliance"} creates a new Meraki network called "Test", when using APIs?
The correct answer is D. POST https://api.meraki.com/api/v0/organizations/<org_id>/networks. To create a new Meraki network called 'Test' within a specific organization using APIs, an HTTP POST request must be sent to the /organizations/<org_id>/networks endpoint with the network details in the request body.
Question
Options
- APUT https://api.meraki.com/api/v0/organizations/<org_id>/networks
- BPOST https://api.meraki.com/api/v0/networks
- CPOST https://api.meraki.com/api/v0/organizations/<org_id>/networks/<net_id>
- DPOST https://api.meraki.com/api/v0/organizations/<org_id>/networks
How the community answered
(56 responses)- A18% (10)
- B7% (4)
- C4% (2)
- D71% (40)
Why each option
To create a new Meraki network called 'Test' within a specific organization using APIs, an HTTP POST request must be sent to the `/organizations/<org_id>/networks` endpoint with the network details in the request body.
The PUT method is generally used to update an existing resource or replace it entirely, not to create a new resource within a collection.
This URI is missing the `organizationId` path parameter, which is essential to specify under which organization the new network should be created.
This URI includes `<net_id>`, which implies an operation on an existing specific network, typically for updates or retrieval, not for creating a new network within an organization's collection.
To create a new resource in a RESTful API, the HTTP POST method is typically used, and the endpoint usually points to the collection where the new resource will be added. Therefore, `POST https://api.meraki.com/api/v0/organizations/<org_id>/networks` is the correct URI for creating a network within a specified organization.
Concept tested: Meraki API network creation via POST
Source: https://developer.cisco.com/meraki/api-v1/#!create-organization-network
Topics
Community Discussion
No community discussion yet for this question.