0
0
Postmantesting~10 mins

Collections and folders 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 create a new collection in Postman.

Postman
const collection = new pm.[1]('My API Collection');
Drag options to blanks, or click blank then click option'
ACollection
BEnvironment
CRequest
DFolder
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Folder' instead of 'Collection' to create a collection.
Confusing 'Request' with 'Collection'.
2fill in blank
medium

Complete the code to add a folder named 'User Endpoints' to an existing collection.

Postman
const folder = collection.[1]('User Endpoints');
Drag options to blanks, or click blank then click option'
AcreateFolder
Badd
Cfolders.add
DaddFolder
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'createFolder' which is not a valid method.
Using 'folders.add' which is incorrect syntax.
3fill in blank
hard

Fix the error in the code to retrieve all folders from a collection.

Postman
const folders = collection.[1]();
Drag options to blanks, or click blank then click option'
AlistFolders
BgetAllFolders
Cfolders
DgetFolders
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'getFolders()' which does not exist.
Calling 'folders()' as a function instead of accessing the property.
4fill in blank
hard

Fill both blanks to add a request named 'Get User' to a folder.

Postman
const request = new pm.Request('[1]', 'https://api.example.com/user');
folder.[2](request);
Drag options to blanks, or click blank then click option'
AGet User
BaddRequest
CcreateRequest
DUser Request
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'User Request' as the request name instead of 'Get User'.
Using 'createRequest' which is not a valid method.
5fill in blank
hard

Fill all three blanks to create a collection with a folder and add a request to that folder.

Postman
const collection = new pm.[1]('My Collection');
const folder = collection.[2]('API Folder');
const request = new pm.Request('List Items', 'https://api.example.com/items');
folder.[3](request);
Drag options to blanks, or click blank then click option'
ACollection
Badd
CaddRequest
DFolder
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Folder' instead of 'Collection' for the first blank.
Using 'createFolder' instead of 'add' for the second blank.
Using 'add' instead of 'addRequest' for the third blank.