Bird
0
0

Given this API documentation snippet:

medium📝 Predict Output Q13 of 15
Rest API - API Documentation
Given this API documentation snippet:
{
  "endpoint": "/users",
  "method": "GET",
  "description": "Returns a list of users",
  "example_response": [{"id":1,"name":"Alice"},{"id":2,"name":"Bob"}]
}

What will a user expect when calling this API?
AA list of user objects with id and name fields.
BAn error message because the method is wrong.
CA single user object with detailed info.
DNo response because the endpoint is missing.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the documentation snippet

    The endpoint "/users" with method GET returns a list of users as shown in example_response.
  2. Step 2: Understand the expected output

    The example_response shows an array of user objects with id and name, so the user expects this list.
  3. Final Answer:

    A list of user objects with id and name fields. -> Option A
  4. Quick Check:

    GET /users returns list of users = A [OK]
Quick Trick: Match example response to expected output [OK]
Common Mistakes:
MISTAKES
  • Confusing list with single object
  • Assuming error without reason
  • Ignoring example response

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes