0
0
HLDsystem_design~10 mins

Why API design affects system usability in HLD - Test Your Understanding

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

Complete the code to define a REST API endpoint that returns user data.

HLD
GET /users/[1]
Drag options to blanks, or click blank then click option'
Alist
Bprofile
Cdelete
Dupdate
Attempts:
3 left
💡 Hint
Common Mistakes
Using verbs like 'delete' or 'update' in a GET request endpoint.
2fill in blank
medium

Complete the code to specify the HTTP method for creating a new resource in REST API.

HLD
HTTP Method: [1] /items
Drag options to blanks, or click blank then click option'
APOST
BGET
CDELETE
DPUT
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing POST with GET or DELETE methods.
3fill in blank
hard

Fix the error in the API response format to improve usability.

HLD
{ "status": "success", "data": [1] }
Drag options to blanks, or click blank then click option'
A[{"id":1,"name":"Alice"}]
Bnull
C"user"
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Returning a string or null instead of structured data.
4fill in blank
hard

Fill both blanks to create a clear and consistent API error response.

HLD
{ "error_code": [1], "message": "[2]" }
Drag options to blanks, or click blank then click option'
A404
B500
CNot Found
DInternal Server Error
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing error codes and messages that don't correspond.
5fill in blank
hard

Fill all three blanks to design an API endpoint with versioning and resource identification.

HLD
"/[1]/v[2]/[3]/{id}"
Drag options to blanks, or click blank then click option'
Aapi
B1
Cusers
Dservice
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting versioning or using unclear resource names.