🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: REST APIs: all 10 questions

Quiz: REST APIs · Question 8 of 10

Where should a filter like "courses costing at most 3000" go in a REST URL?

Where should a filter like "courses costing at most 3000" go in a REST URL?

  1. A.A new path such as /api/getCheapCourses
  2. B.The request body of a GET
  3. C.A custom HTTP method
  4. D.A query parameter: GET /api/courses?maxFee=3000
Answer & explanation

Correct answer: A query parameter: GET /api/courses?maxFee=3000

Filters, paging and sorting use query parameters on the same resource.

Can you get the rest right without peeking?

Take the timed Quiz: REST APIs quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →