0
0
Rest APIprogramming~10 mins

Plural vs singular resource names in Rest API - Interactive Practice

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

Complete the code to define the endpoint for retrieving all users.

Rest API
GET /[1]
Drag options to blanks, or click blank then click option'
Ausers
Buser
Cprofile
Daccount
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular form for a collection endpoint like /user instead of /users.
2fill in blank
medium

Complete the code to define the endpoint for retrieving a single user by ID.

Rest API
GET /users/[1]
Drag options to blanks, or click blank then click option'
Aall
Bid
C{id}
D123
Attempts:
3 left
💡 Hint
Common Mistakes
Using a fixed number like 123 instead of a variable placeholder.
Using 'id' without curly braces.
3fill in blank
hard

Fix the error in the endpoint for creating a new user.

Rest API
POST /[1]
Drag options to blanks, or click blank then click option'
Auser
Busers
Cuser/{id}
Dusers/{id}
Attempts:
3 left
💡 Hint
Common Mistakes
Including an ID in the URL for POST requests to create resources.
4fill in blank
hard

Fill both blanks to define the endpoint for updating a user's profile.

Rest API
PUT /[1]/[2]/profile
Drag options to blanks, or click blank then click option'
Ausers
Buser
C{userId}
Did
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular resource name for the collection.
Using a fixed string like 'id' instead of a parameter.
5fill in blank
hard

Fill all three blanks to define the endpoint for deleting a specific order item.

Rest API
DELETE /[1]/[2]/[3]
Drag options to blanks, or click blank then click option'
Aorders
B{orderId}
Citems
D{itemId}
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular resource names instead of plural.
Using fixed strings instead of parameters for IDs.