0
0
Rest APIprogramming~10 mins

Pagination with limit and offset 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 set the limit parameter for pagination.

Rest API
GET /items?limit=[1]
Drag options to blanks, or click blank then click option'
A10
Bpage
Coffset
Dsort
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'offset' instead of a number for limit.
Confusing 'page' with 'limit'.
2fill in blank
medium

Complete the code to set the offset parameter for pagination.

Rest API
GET /items?limit=10&offset=[1]
Drag options to blanks, or click blank then click option'
Apage
B20
Climit
Dsort
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'page' instead of a number for offset.
Confusing 'limit' with 'offset'.
3fill in blank
hard

Fix the error in the query string to correctly paginate with limit and offset.

Rest API
GET /items?limit=10&offset=[1]
Drag options to blanks, or click blank then click option'
A30
B-10
Cten
D'ten'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string like 'ten' instead of a number.
Using a negative number for offset.
4fill in blank
hard

Fill both blanks to create a query string that requests 15 items starting from the 45th item.

Rest API
GET /items?limit=[1]&offset=[2]
Drag options to blanks, or click blank then click option'
A15
B30
C45
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping limit and offset values.
Using offset less than limit.
5fill in blank
hard

Fill all three blanks to create a query string that requests 25 items starting from the 50th item, sorted by date.

Rest API
GET /items?limit=[1]&offset=[2]&sort=[3]
Drag options to blanks, or click blank then click option'
A25
B50
Cdate
Dname
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'name' instead of 'date' for sorting.
Mixing up limit and offset values.