nerdexam
Cisco

200-901 · Question #109

Drag and Drop Question Drag and drop the HTTP methods from the left onto their generally accepted corresponding create, read, update, and delete operations on the right. Answer:

The correct answer is POST; GET; PUT; PATCH; DELETE. This question tests the understanding of common HTTP methods and their standard mapping to Create, Read, Update, and Delete (CRUD) operations in RESTful API design.

Understanding and Using APIs

Question

Drag and Drop Question Drag and drop the HTTP methods from the left onto their generally accepted corresponding create, read, update, and delete operations on the right. Answer:

Exhibit

200-901 question #109 exhibit

Answer Area

Drag items

DELETEGETPATCHPOSTPUT

Correct arrangement

  • POST
  • GET
  • PUT
  • PATCH
  • DELETE

Explanation

This question tests the understanding of common HTTP methods and their standard mapping to Create, Read, Update, and Delete (CRUD) operations in RESTful API design.

Approach. The correct interaction involves dragging each HTTP method from the left to its appropriate CRUD operation target on the right based on standard RESTful conventions:

  • Drag 'POST' to 'Create': POST is primarily used to submit data to a specified resource, often resulting in the creation of a new resource.
  • Drag 'GET' to 'Read': GET is used to request data from a specified resource; it only retrieves data and should not have any other side effects (idempotent and safe).
  • Drag 'PUT' to one of the 'Update' targets: PUT is used to update an existing resource by replacing the entire resource, or to create a resource if it does not exist at the specified URI.
  • Drag 'PATCH' to the remaining 'Update' target: PATCH is used for partial modifications to an existing resource.
  • Drag 'DELETE' to 'Delete': DELETE is used to remove the specified resource.

Common mistakes.

  • common_mistake. A common mistake is confusing 'PUT' and 'PATCH' or misassigning 'POST' due to less strict usage in some non-RESTful contexts.
  • Dragging 'POST' to 'Update' is incorrect because, while POST can sometimes be used for updates, its primary and generally accepted use in REST is for creating new resources.
  • Confusing 'PUT' and 'PATCH' by assigning them to 'Create' or 'Delete' is incorrect, as both are specifically for modifying (updating) resources, differing in whether they replace the entire resource (PUT) or just part of it (PATCH).
  • Assigning 'GET' to anything other than 'Read' is incorrect, as 'GET' is strictly for data retrieval.
  • Assigning 'DELETE' to anything other than 'Delete' is incorrect, as its purpose is explicit resource removal.

Concept tested. HTTP methods, RESTful API design principles, and their mapping to Create, Read, Update, Delete (CRUD) operations. This includes understanding the specific semantics and typical use cases of POST, GET, PUT, PATCH, and DELETE.

Reference. null

Topics

#HTTP methods#REST APIs#CRUD operations#Web services

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice