Bird
0
0

What fields will be included in the response for the request /profiles?fields[profiles]=username,age if the API normally returns username, age, and email?

medium📝 Predict Output Q5 of 15
Rest API - Advanced Patterns
What fields will be included in the response for the request /profiles?fields[profiles]=username,age if the API normally returns username, age, and email?
AOnly <code>email</code> field
BAll three fields: <code>username</code>, <code>age</code>, and <code>email</code>
COnly <code>username</code> and <code>age</code> fields
DNo fields will be returned
Step-by-Step Solution
Solution:
  1. Step 1: Analyze sparse fieldset request

    The request limits fields to username and age.
  2. Step 2: Understand API response

    Only requested fields are included; email is excluded.
  3. Final Answer:

    Only username and age fields -> Option C
  4. Quick Check:

    Fields not requested are omitted [OK]
Quick Trick: Only requested fields appear in response [OK]
Common Mistakes:
MISTAKES
  • Expecting all default fields to be returned
  • Confusing omitted fields as included
  • Misreading the query parameter syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes