300-435 · Question #80
An engineer needs to create a new network using the Meraki API. Which HTTP action to the URL https://api.meraki.com/api/v0/organizations/<new_org_id>/networks will result in a 201 response code?
The correct answer is B. POST. To create a new network resource using the Meraki API, the HTTP POST method is employed, which typically responds with a 201 Created status code upon successful resource creation.
Question
Exhibit
Options
- AGET
- BPOST
- CPUT
- DADD
How the community answered
(44 responses)- A2% (1)
- B93% (41)
- C5% (2)
Why each option
To create a new network resource using the Meraki API, the HTTP POST method is employed, which typically responds with a 201 Created status code upon successful resource creation.
GET requests are used to retrieve existing resources and typically return a 200 OK status code for success, not 201 Created.
In RESTful API design, the POST method is used to create new resources on the server. When a POST request successfully creates a resource, the server typically responds with an HTTP 201 Created status code, indicating that the request has succeeded and a new resource has been created as a result.
PUT requests are used to update or replace an existing resource at a specific URI, or create if it does not exist at that URI, but for creating a new resource, POST is the more conventional and expected method to return a 201.
ADD is not a standard HTTP method; common HTTP methods for interacting with APIs are GET, POST, PUT, DELETE, and PATCH.
Concept tested: RESTful API HTTP methods for resource creation
Source: https://developer.cisco.com/meraki/api-v1/
Topics
Community Discussion
No community discussion yet for this question.
