Bird
0
0

You want to fetch a list of books published after 2010 using a GET request. Which URL correctly applies a filter for this?

hard📝 Application Q8 of 15
Rest API - HTTP Methods
You want to fetch a list of books published after 2010 using a GET request. Which URL correctly applies a filter for this?
A/books?published_after=2010
B/books/published_after/2010
C/books#published_after=2010
D/books?filter=published_after>2010
Step-by-Step Solution
Solution:
  1. Step 1: Understand query parameters for filtering

    Filters are usually passed as key=value pairs in query string.
  2. Step 2: Identify correct filter syntax

    /books?published_after=2010 correctly filters books published after 2010.
  3. Final Answer:

    /books?published_after=2010 -> Option A
  4. Quick Check:

    Filter uses query parameter key=value [OK]
Quick Trick: Use query params for filtering GET results [OK]
Common Mistakes:
  • Using path segments for filters
  • Using fragment (#) for filters
  • Using invalid operators in query

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes