0
0
Rest APIprogramming~10 mins

Noun-based resource naming 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 name the resource correctly in a REST API endpoint.

Rest API
GET /[1]
Drag options to blanks, or click blank then click option'
AuserList
BgetUser
CfetchUsers
Dusers
Attempts:
3 left
💡 Hint
Common Mistakes
Using verbs like 'getUser' instead of nouns.
Using singular nouns for collections.
2fill in blank
medium

Complete the code to correctly name the resource for a single item in a REST API endpoint.

Rest API
GET /users/[1]
Drag options to blanks, or click blank then click option'
Aid
B123
Clist
Dget
Attempts:
3 left
💡 Hint
Common Mistakes
Using verbs or words like 'get' or 'list' instead of an ID.
Using 'id' literally instead of an example or placeholder.
3fill in blank
hard

Fix the error in the resource naming by completing the code with the correct noun-based resource name.

Rest API
POST /[1]
Drag options to blanks, or click blank then click option'
AcreateUser
BaddUser
Cusers
DnewUser
Attempts:
3 left
💡 Hint
Common Mistakes
Using verbs in resource names for POST endpoints.
Using singular nouns instead of plural.
4fill in blank
hard

Fill both blanks to correctly name the resource and its identifier in the REST API endpoint.

Rest API
DELETE /[1]/[2]
Drag options to blanks, or click blank then click option'
Ausers
Bposts
C456
D789
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular nouns for resource names.
Using non-numeric or verb values as IDs.
5fill in blank
hard

Fill all three blanks to create a correct REST API endpoint for updating a resource.

Rest API
PUT /[1]/[2]/[3]
Drag options to blanks, or click blank then click option'
Ausers
B123
Cprofile
Dsettings
Attempts:
3 left
💡 Hint
Common Mistakes
Using verbs instead of nouns for resource names.
Using invalid IDs or missing sub-resource names.