0
0
Postmantesting~10 mins

Path parameters in Postman - Interactive Code Practice

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

Complete the code to define a path parameter in the URL.

Postman
GET https://api.example.com/users/[1]
Drag options to blanks, or click blank then click option'
A{userId}
B[userId]
C<userId>
D:userId
Attempts:
3 left
💡 Hint
Common Mistakes
Using curly braces {} which is common in some frameworks but not in Postman.
Using angle brackets <> which are not valid for path parameters.
Using square brackets [] which are not used for path parameters.
2fill in blank
medium

Complete the code to set a path parameter value in Postman.

Postman
pm.variables.set('[1]', '12345');
Drag options to blanks, or click blank then click option'
ApathParam
BuserId
CparamValue
Did
Attempts:
3 left
💡 Hint
Common Mistakes
Using a generic name like 'paramValue' instead of the exact path parameter name.
Using 'id' or 'pathParam' which do not match the URL parameter.
3fill in blank
hard

Fix the error in the code to correctly use a path parameter in the request URL.

Postman
GET https://api.example.com/orders/[1]
Drag options to blanks, or click blank then click option'
A:orderId
B{orderId}
C[orderId]
D<orderId>
Attempts:
3 left
💡 Hint
Common Mistakes
Using curly braces {} which are not recognized by Postman for path parameters.
Using angle or square brackets which cause errors.
4fill in blank
hard

Fill both blanks to correctly define and set a path parameter in Postman.

Postman
GET https://api.example.com/products/[1]
pm.variables.set('[2]', '98765');
Drag options to blanks, or click blank then click option'
A:productId
BproductId
Cid
Dparam
Attempts:
3 left
💡 Hint
Common Mistakes
Using different names for the URL parameter and the variable.
Including the colon ':' in the variable name when setting it.
5fill in blank
hard

Fill all three blanks to create a request URL with two path parameters and set their values in Postman.

Postman
GET https://api.example.com/[1]/[2]
pm.variables.set('[3]', '555');
Drag options to blanks, or click blank then click option'
A:category
B:itemId
CitemId
Dcategory
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of parameters in the URL.
Including the colon ':' in the variable name when setting it.
Setting the wrong variable name that does not match the URL parameter.