Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to filter users by their age.
Rest API
GET /users?age=[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a field name instead of a value.
Using an unrelated field like email.
✗ Incorrect
The query parameter age=25 filters users who are 25 years old.
2fill in blank
mediumComplete the code to filter products by category.
Rest API
GET /products?category=[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a numeric value instead of a category name.
Using unrelated fields like price.
✗ Incorrect
The query parameter category=electronics filters products in the electronics category.
3fill in blank
hardFix the error in filtering orders by status.
Rest API
GET /orders?status=[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number instead of a status string.
Using unrelated fields like date.
✗ Incorrect
The status filter should be a string like completed, not a number or unrelated field.
4fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping author and year values.
Using invalid year formats.
✗ Incorrect
The query filters books by author 'tolkien' and year '2020'.
5fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up genre and rating values.
Using invalid year formats.
✗ Incorrect
The query filters movies with genre 'action', rating 'PG-13', and year '2022'.