Bird
0
0

Given the API request /articles?fields[articles]=title,summary, what fields will the server include in the response for each article?

medium📝 Predict Output Q13 of 15
Rest API - Advanced Patterns
Given the API request /articles?fields[articles]=title,summary, what fields will the server include in the response for each article?
AOnly the <code>title</code> and <code>summary</code> fields
BAll fields except <code>title</code> and <code>summary</code>
COnly the <code>title</code> field
DAll fields of the article
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the query parameter

    The query fields[articles]=title,summary requests only the title and summary fields for articles.
  2. Step 2: Determine response fields

    The server will include only these two fields in each article's response, excluding others.
  3. Final Answer:

    Only the title and summary fields -> Option A
  4. Quick Check:

    fields[articles]=title,summary means only those fields [OK]
Quick Trick: Requested fields appear; others are excluded [OK]
Common Mistakes:
MISTAKES
  • Assuming all fields are returned
  • Thinking fields are excluded instead of included
  • Confusing field names with resource names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes