0
0
Postmantesting~10 mins

Workspace organization 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 workspace in Postman.

Postman
pm.workspaces.create({ name: [1] });
Drag options to blanks, or click blank then click option'
A'My Workspace'
BworkspaceName
CMy Workspace
DcreateWorkspace
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to use quotes around the workspace name.
Passing a variable name instead of a string.
2fill in blank
medium

Complete the code to list all collections in the current workspace.

Postman
pm.collections.list({ workspace: [1] });
Drag options to blanks, or click blank then click option'
A'current'
B'default'
C'active'
D'all'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect workspace names like 'current' or 'active'.
Not using quotes around the workspace name.
3fill in blank
hard

Fix the error in the code to switch to a workspace by its ID.

Postman
pm.workspaces.switch({ id: [1] });
Drag options to blanks, or click blank then click option'
A12345
B'workspaceId'
CworkspaceId
D'12345'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the ID as a variable without quotes.
Passing the ID as a number without quotes.
4fill in blank
hard

Fill both blanks to create a new environment in a workspace.

Postman
pm.environments.create({ name: [1], workspace: [2] });
Drag options to blanks, or click blank then click option'
A'Test Environment'
B'default'
C'Production'
D'envWorkspace'
Attempts:
3 left
💡 Hint
Common Mistakes
Using workspace names that don't exist.
Not using quotes around strings.
5fill in blank
hard

Fill all three blanks to update a workspace's description and visibility.

Postman
pm.workspaces.update({ id: [1], description: [2], visibility: [3] });
Drag options to blanks, or click blank then click option'
A'12345'
B'Updated workspace for testing'
C'private'
D'public'
Attempts:
3 left
💡 Hint
Common Mistakes
Using numbers instead of strings for ID.
Using invalid visibility values.
Forgetting quotes around strings.