0
0
Rest APIprogramming~10 mins

Filtering by field values in Rest API - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to filter users by their age.

Rest API
GET /users?age=[1]
Drag options to blanks, or click blank then click option'
Aname
B25
Cemail
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using a field name instead of a value.
Using an unrelated field like email.
2fill in blank
medium

Complete the code to filter products by category.

Rest API
GET /products?category=[1]
Drag options to blanks, or click blank then click option'
Aprice
Bquantity
Cdiscount
Delectronics
Attempts:
3 left
💡 Hint
Common Mistakes
Using a numeric value instead of a category name.
Using unrelated fields like price.
3fill in blank
hard

Fix the error in filtering orders by status.

Rest API
GET /orders?status=[1]
Drag options to blanks, or click blank then click option'
Acompleted
B123
Cdate
Dtotal
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number instead of a status string.
Using unrelated fields like date.
4fill in blank
hard

Fill both blanks to filter books by author and year.

Rest API
GET /books?author=[1]&year=[2]
Drag options to blanks, or click blank then click option'
Atolkien
B2020
C2018
Drowling
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping author and year values.
Using invalid year formats.
5fill in blank
hard

Fill all three blanks to filter movies by genre, rating, and year.

Rest API
GET /movies?genre=[1]&rating=[2]&year=[3]
Drag options to blanks, or click blank then click option'
Acomedy
BPG-13
C2022
Daction
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up genre and rating values.
Using invalid year formats.