Bird
0
0

Given the REST API call: DELETE /products/789, what is the expected action?

medium📝 Predict Output Q13 of 15
Rest API - URL and Resource Design
Given the REST API call: DELETE /products/789, what is the expected action?
ADelete product with ID 789
BCreate a new product with ID 789
CRetrieve product with ID 789
DUpdate product with ID 789
Step-by-Step Solution
Solution:
  1. Step 1: Understand HTTP DELETE method

    DELETE is used to remove a resource identified by the URL.
  2. Step 2: Apply to given URL

    The URL /products/789 identifies product 789, so DELETE removes it.
  3. Final Answer:

    Delete product with ID 789 -> Option A
  4. Quick Check:

    DELETE removes resource = Delete product with ID 789 [OK]
Quick Trick: DELETE method removes resource at URL [OK]
Common Mistakes:
MISTAKES
  • Thinking DELETE retrieves data
  • Confusing DELETE with POST or PUT
  • Assuming URL contains action verbs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes