Create New Workspace
POST https://api.getpostman.com/workspaces
Create New Workspace
Creates a new [Workspace] to store all of the generated Qodex elements.
Overview
Body tab
Sends in a workspace
JSON object that contains:
name
— A string that contains the Workspace's name.type
— A string that contains the Workspace type:personal
— A personal Workspace.team
— A team Workspace.
You can also include the following optional properties in the Request body:
description
— A string that contains a description of the Workspace.
Pre-request Script tab
- Sends a message to the Console that the Request is starting to create a new Workspace.
- Leverages the MomentJS library to set a reusable
today
variable value. This value is subsequently used to add a unique name to the Workspace you're creating.
Tests tab
- Checks for a 200 HTTP response to confirm that the new Workspace has been created.
- Parses the Response.
- Sets the new ID as the value for
workspaceId
Collection Variable.
Request Body
{"workspace"=>{"name"=>"{{newWorkspaceName}} | {{today}}", "description"=>"{{newWorkspaceDescription}}", "type"=>"team"}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"workspace":{"id":"01829348-42f5-24rt-42wd-3b993fee47ac","name":"Scaffolded Workspace 04/19/2023 8:35"}}