Bird
0
0

Which of the following is the correct syntax to request only 'id' and 'title' fields in a REST API query?

easy📝 Syntax Q3 of 15
Rest API - Query Parameters and Filtering
Which of the following is the correct syntax to request only 'id' and 'title' fields in a REST API query?
A/items?fields=id,title
B/items?select=id;title
C/items?filter=id,title
D/items?get=id&get=title
Step-by-Step Solution
Solution:
  1. Step 1: Recognize common field selection syntax

    Many APIs use 'fields' parameter with comma-separated values to select fields.
  2. Step 2: Compare options to standard syntax

    /items?fields=id,title uses 'fields=id,title' which is standard and correct.
  3. Final Answer:

    /items?fields=id,title -> Option A
  4. Quick Check:

    Field selection syntax = fields=field1,field2 [OK]
Quick Trick: Use 'fields=' with commas to select fields [OK]
Common Mistakes:
  • Using semicolons instead of commas
  • Confusing filter with fields
  • Repeating parameters incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes