Bird
0
0

What is the expected output of /orders?filter=status:shipped&fields=id,total?

medium📝 Predict Output Q5 of 15
Rest API - Query Parameters and Filtering
What is the expected output of /orders?filter=status:shipped&fields=id,total?
AOrders with status 'shipped' showing only id and total fields.
BAll orders showing id, total, and status fields.
COrders filtered by status but showing all fields.
DAn error due to incorrect filter syntax.
Step-by-Step Solution
Solution:
  1. Step 1: Understand filter parameter

    Filters orders to only those with status 'shipped'.
  2. Step 2: Understand fields parameter

    Limits returned fields to 'id' and 'total' only.
  3. Final Answer:

    Orders with status 'shipped' showing only id and total fields. -> Option A
  4. Quick Check:

    Filter narrows data; fields limit output [OK]
Quick Trick: Filter narrows results; fields limit data shown [OK]
Common Mistakes:
MISTAKES
  • Expecting all fields despite fields param
  • Misreading filter syntax as error
  • Assuming filter does not affect output

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes