0
0
Rest APIprogramming~10 mins

Avoiding verbs in URLs 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 create a REST API endpoint URL that avoids verbs.

Rest API
GET /api/[1]
Drag options to blanks, or click blank then click option'
AupdateUser
BgetUsers
CfetchData
Dusers
Attempts:
3 left
💡 Hint
Common Mistakes
Using verbs like 'getUsers' or 'updateUser' in the URL.
2fill in blank
medium

Complete the URL to correctly represent a resource collection without verbs.

Rest API
POST /api/[1]
Drag options to blanks, or click blank then click option'
AaddNewUser
BsubmitUser
Cusers
DcreateUser
Attempts:
3 left
💡 Hint
Common Mistakes
Including verbs such as 'createUser' in the URL.
3fill in blank
hard

Fix the error in the URL by replacing the verb with a noun.

Rest API
DELETE /api/[1]/123
Drag options to blanks, or click blank then click option'
AdeleteUser
Busers
CremoveUser
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using verbs like 'deleteUser' in the URL path.
4fill in blank
hard

Fill both blanks to create a RESTful URL that avoids verbs and correctly identifies a single resource.

Rest API
PUT /api/[1]/[2]
Drag options to blanks, or click blank then click option'
Ausers
B123
CupdateUser
Dmodify
Attempts:
3 left
💡 Hint
Common Mistakes
Putting verbs like 'updateUser' in the URL instead of resource names.
5fill in blank
hard

Fill all three blanks to create a RESTful URL that avoids verbs and correctly accesses a sub-resource.

Rest API
GET /api/[1]/[2]/[3]
Drag options to blanks, or click blank then click option'
Ausers
B123
Corders
DgetOrders
Attempts:
3 left
💡 Hint
Common Mistakes
Including verbs like 'getOrders' in the URL.