0
0
HLDsystem_design~10 mins

API versioning strategies in HLD - Interactive Code Practice

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

Complete the code to specify the version in the URL path.

HLD
GET /api/[1]/users
Drag options to blanks, or click blank then click option'
Aversion1
Bv1
Capi1
Dusers
Attempts:
3 left
💡 Hint
Common Mistakes
Using descriptive words instead of short version tags.
2fill in blank
medium

Complete the code to specify the version using a custom header.

HLD
GET /users
Headers: Accept: application/json; [1]=v2
Drag options to blanks, or click blank then click option'
AVersion
BContent-Type
CAccept-Version
Dapi-version
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'Content-Type' or 'Accept' headers with versioning.
3fill in blank
hard

Fix the error in the versioning query parameter.

HLD
GET /users?[1]=1
Drag options to blanks, or click blank then click option'
Aversion
Bver
Capi_version
Dv
Attempts:
3 left
💡 Hint
Common Mistakes
Using unclear or abbreviated query parameter names.
4fill in blank
hard

Fill both blanks to complete the header-based versioning example.

HLD
GET /users
Headers: [1]: application/json
Headers: [2]: v3
Drag options to blanks, or click blank then click option'
AAccept
BContent-Type
Capi-version
DVersion
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing 'Content-Type' with 'Accept' or using wrong version header names.
5fill in blank
hard

Fill all three blanks to complete the versioning strategy using media type versioning.

HLD
GET /users
Headers: Accept: application/vnd.myapp.[1]+json

Response Content-Type: application/vnd.myapp.[2]+json

API version used: [3]
Drag options to blanks, or click blank then click option'
Av1
Bv2
Attempts:
3 left
💡 Hint
Common Mistakes
Using different versions in Accept and Content-Type headers.