DevZero Logo
DevZero

Create a workspace

POST
/v2/teams/{team_id}/workspaces
/v2/teams/{team_id}/workspaces

Request Body

application/jsonRequired

create workspace body

clusterobject

General cluster object

network_idstring

network id

nicknamestring

workspace display name (optional), must be lowercase letters, numbers, dashes, or underscores

personal_access_tokenstring

github personal access token

quickstart_idstring

id of the quickstart to launch, if provided will use this quickstart instead of the recipe

recipe_id
Required
string

recipe id

recipe_version_idstring

recipe version id from which to launch the workspace, supersedes the launch version in the recipe

regionstring

user selected region during ws creation

region_namestring

user selected region name during ws creation

storage_volume_sizeinteger

size of the storage volume in GB

volume_mountsarray<object>

volumes to mount on the workspace

Path Parameters

team_id
Required
string

ID of team

Header Parameters

Authorization
Required
string

Value: "Bearer <token>"; visit the "User Settings" page in the DevZero dashboard to generate a token

curl -X POST "https://api.devzero.io/backend/v0/v2/teams/string/workspaces" \
  -H "Authorization: string" \
  -H "Content-Type: application/json" \
  -d '{
    "cluster": {
      "created_at": "2019-08-24T14:15:22Z",
      "deleted_at": "2019-08-24",
      "description": "string",
      "disable_hibernation": false,
      "id": "string",
      "nickname": "string",
      "num_workspaces": 0,
      "region": "string",
      "region_name": "string",
      "status": "Unknown",
      "team_id": "string",
      "updated_at": "2019-08-24",
      "user": {
        "default_region": "string",
        "default_region_name": "string",
        "dora_connection_ids": [
          "string"
        ],
        "dxi_onboarding_checklist": {
          "analyze_own_code": "SKIPPED",
          "development_process_bottlenecks": "SKIPPED",
          "devzero_cli": "SKIPPED",
          "github_token": "SKIPPED",
          "is_dora_repository_connected": true
        },
        "email": "user@example.com",
        "given_name": "string",
        "id": "string",
        "is_global_admin": true,
        "linked_vcss": [
          {
            "link_metadata": "string",
            "vsc_uri": "string"
          }
        ],
        "onboarding_checklist": {
          "has_completed_onboarding": true,
          "has_completed_onboarding_checklist": true,
          "has_completed_recipe_quick_starters": true,
          "has_created_recipe": true,
          "has_dismissed_quickstart": true,
          "has_dismissed_recipe_callout": true,
          "has_forked_quickstart": true,
          "has_launched_workspace": true,
          "has_seen_github_app_modal": true,
          "has_seen_onboarding_recipe_modal": true,
          "onboarding_path": "undefined"
        },
        "organization_join_date": 0,
        "sub": "string",
        "teams": [
          {
            "authorized_oauth2_repo_manager_integrations": [
              "string"
            ],
            "connected_github_user": "string",
            "connected_github_user_url": "string",
            "gh_user_access_token": "string",
            "is_owner": true,
            "name": "string",
            "permissions": "string",
            "role": "string",
            "team_id": "string",
            "user_id": "string"
          }
        ],
        "timezone": "string",
        "user_scoped_recipe": "string"
      },
      "user_id": "string",
      "workspaces": [
        {
          "cluster_id": "string",
          "cluster_nickname": "string",
          "created_at": "2019-08-24T14:15:22Z",
          "current_hardware_spec": {
            "cpu": 0,
            "memory": 0,
            "storage": 0
          },
          "hostname": "string",
          "id": "string",
          "kubeconfig": "string",
          "modified_at": "2019-08-24T14:15:22Z",
          "mounted_volumes": [
            {
              "created_at": "2019-08-24T14:15:22Z",
              "created_by": {
                "default_region": "string",
                "default_region_name": "string",
                "dora_connection_ids": [
                  "string"
                ],
                "dxi_onboarding_checklist": {
                  "analyze_own_code": "SKIPPED",
                  "development_process_bottlenecks": "SKIPPED",
                  "devzero_cli": "SKIPPED",
                  "github_token": "SKIPPED",
                  "is_dora_repository_connected": true
                },
                "email": "user@example.com",
                "given_name": "string",
                "id": "string",
                "is_global_admin": true,
                "linked_vcss": [
                  {
                    "link_metadata": "string",
                    "vsc_uri": "string"
                  }
                ],
                "onboarding_checklist": {
                  "has_completed_onboarding": true,
                  "has_completed_onboarding_checklist": true,
                  "has_completed_recipe_quick_starters": true,
                  "has_created_recipe": true,
                  "has_dismissed_quickstart": true,
                  "has_dismissed_recipe_callout": true,
                  "has_forked_quickstart": true,
                  "has_launched_workspace": true,
                  "has_seen_github_app_modal": true,
                  "has_seen_onboarding_recipe_modal": true,
                  "onboarding_path": "undefined"
                },
                "organization_join_date": 0,
                "sub": "string",
                "teams": [
                  {
                    "authorized_oauth2_repo_manager_integrations": [
                      "string"
                    ],
                    "connected_github_user": "string",
                    "connected_github_user_url": "string",
                    "gh_user_access_token": "string",
                    "is_owner": true,
                    "name": "string",
                    "permissions": "string",
                    "role": "string",
                    "team_id": "string",
                    "user_id": "string"
                  }
                ],
                "timezone": "string",
                "user_scoped_recipe": "string"
              },
              "id": "string",
              "name": "string",
              "region": {
                "id": "string",
                "latitude": 0,
                "longitude": 0,
                "name": "string",
                "provided_by": "string",
                "slug": "string"
              },
              "size": 0,
              "status": "Creating",
              "team_id": "string",
              "usage": {},
              "volume_mounts": [
                {
                  "mount_path": "string",
                  "storage_volume_id": "string",
                  "volume_sub_path": "string",
                  "workload_id": "string",
                  "workload_name": "string"
                }
              ]
            }
          ],
          "network": {
            "created_at": "2019-08-24T14:15:22Z",
            "display_name": "string",
            "hydra_network_name": "string",
            "id": "string",
            "team_id": "string"
          },
          "new_launch_version_available": true,
          "nickname": "string",
          "quickstart": {
            "description": "string",
            "id": "string",
            "name": "string",
            "recipe": "string",
            "tag": "string"
          },
          "recipe_deleted": true,
          "recipe_id": "string",
          "recipe_version": {
            "build": {
              "base_image": {
                "cli_image": "string",
                "display_image": "string",
                "image": "string"
              },
              "build_step_checks": [
                {
                  "command": "string",
                  "completed_at": "string",
                  "error": "string",
                  "is_cached": true,
                  "is_user_step": true,
                  "last_updated": "string",
                  "logsrv_id": "string",
                  "name": "string",
                  "start_time": "string",
                  "status": "pending",
                  "step_id": "string"
                }
              ],
              "created_at": "2019-08-24T14:15:22Z",
              "id": "string",
              "modified_at": "2019-08-24T14:15:22Z",
              "recipe_id": "string",
              "recipe_name": "string",
              "recipe_version_id": "string",
              "status": "Not Started",
              "team_id": "string",
              "user_id": "string"
            },
            "created_at": "2019-08-24T14:15:22Z",
            "id": "string",
            "recipe": "string",
            "recipe_defaults": "string",
            "repos": [
              "string"
            ],
            "team_id": "string",
            "user": {
              "default_region": "string",
              "default_region_name": "string",
              "dora_connection_ids": [
                "string"
              ],
              "dxi_onboarding_checklist": {
                "analyze_own_code": "SKIPPED",
                "development_process_bottlenecks": "SKIPPED",
                "devzero_cli": "SKIPPED",
                "github_token": "SKIPPED",
                "is_dora_repository_connected": true
              },
              "email": "user@example.com",
              "given_name": "string",
              "id": "string",
              "is_global_admin": true,
              "linked_vcss": [
                {
                  "link_metadata": "string",
                  "vsc_uri": "string"
                }
              ],
              "onboarding_checklist": {
                "has_completed_onboarding": true,
                "has_completed_onboarding_checklist": true,
                "has_completed_recipe_quick_starters": true,
                "has_created_recipe": true,
                "has_dismissed_quickstart": true,
                "has_dismissed_recipe_callout": true,
                "has_forked_quickstart": true,
                "has_launched_workspace": true,
                "has_seen_github_app_modal": true,
                "has_seen_onboarding_recipe_modal": true,
                "onboarding_path": "undefined"
              },
              "organization_join_date": 0,
              "sub": "string",
              "teams": [
                {
                  "authorized_oauth2_repo_manager_integrations": [
                    "string"
                  ],
                  "connected_github_user": "string",
                  "connected_github_user_url": "string",
                  "gh_user_access_token": "string",
                  "is_owner": true,
                  "name": "string",
                  "permissions": "string",
                  "role": "string",
                  "team_id": "string",
                  "user_id": "string"
                }
              ],
              "timezone": "string",
              "user_scoped_recipe": "string"
            }
          },
          "region": "string",
          "region_name": "string",
          "status": "Building",
          "status_hint": "string",
          "team_id": "string",
          "user": {
            "default_region": "string",
            "default_region_name": "string",
            "dora_connection_ids": [
              "string"
            ],
            "dxi_onboarding_checklist": {
              "analyze_own_code": "SKIPPED",
              "development_process_bottlenecks": "SKIPPED",
              "devzero_cli": "SKIPPED",
              "github_token": "SKIPPED",
              "is_dora_repository_connected": true
            },
            "email": "user@example.com",
            "given_name": "string",
            "id": "string",
            "is_global_admin": true,
            "linked_vcss": [
              {
                "link_metadata": "string",
                "vsc_uri": "string"
              }
            ],
            "onboarding_checklist": {
              "has_completed_onboarding": true,
              "has_completed_onboarding_checklist": true,
              "has_completed_recipe_quick_starters": true,
              "has_created_recipe": true,
              "has_dismissed_quickstart": true,
              "has_dismissed_recipe_callout": true,
              "has_forked_quickstart": true,
              "has_launched_workspace": true,
              "has_seen_github_app_modal": true,
              "has_seen_onboarding_recipe_modal": true,
              "onboarding_path": "undefined"
            },
            "organization_join_date": 0,
            "sub": "string",
            "teams": [
              {
                "authorized_oauth2_repo_manager_integrations": [
                  "string"
                ],
                "connected_github_user": "string",
                "connected_github_user_url": "string",
                "gh_user_access_token": "string",
                "is_owner": true,
                "name": "string",
                "permissions": "string",
                "role": "string",
                "team_id": "string",
                "user_id": "string"
              }
            ],
            "timezone": "string",
            "user_scoped_recipe": "string"
          },
          "workspace_recipe_summary": {
            "cpu": "string",
            "created_at": "2019-08-24T14:15:22Z",
            "memory": "string",
            "name": "string",
            "repos": [
              "string"
            ],
            "storage": "string",
            "tags": {
              "origin": "quickstart"
            }
          }
        }
      ]
    },
    "network_id": "string",
    "nickname": "string",
    "personal_access_token": "string",
    "quickstart_id": "string",
    "recipe_id": "string",
    "recipe_version_id": "string",
    "region": "string",
    "region_name": "string",
    "storage_volume_size": 10,
    "volume_mounts": [
      {
        "mount_path": "string",
        "storage_volume_id": "string",
        "volume_sub_path": "string",
        "workload_id": "string",
        "workload_name": "string"
      }
    ]
  }'

OK

{
  "cluster_id": "string",
  "cluster_nickname": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "current_hardware_spec": {
    "cpu": 0,
    "memory": 0,
    "storage": 0
  },
  "hostname": "string",
  "id": "string",
  "kubeconfig": "string",
  "modified_at": "2019-08-24T14:15:22Z",
  "mounted_volumes": [
    {
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "default_region": "string",
        "default_region_name": "string",
        "dora_connection_ids": [
          "string"
        ],
        "dxi_onboarding_checklist": {
          "analyze_own_code": "SKIPPED",
          "development_process_bottlenecks": "SKIPPED",
          "devzero_cli": "SKIPPED",
          "github_token": "SKIPPED",
          "is_dora_repository_connected": true
        },
        "email": "user@example.com",
        "given_name": "string",
        "id": "string",
        "is_global_admin": true,
        "linked_vcss": [
          {
            "link_metadata": "string",
            "vsc_uri": "string"
          }
        ],
        "onboarding_checklist": {
          "has_completed_onboarding": true,
          "has_completed_onboarding_checklist": true,
          "has_completed_recipe_quick_starters": true,
          "has_created_recipe": true,
          "has_dismissed_quickstart": true,
          "has_dismissed_recipe_callout": true,
          "has_forked_quickstart": true,
          "has_launched_workspace": true,
          "has_seen_github_app_modal": true,
          "has_seen_onboarding_recipe_modal": true,
          "onboarding_path": "undefined"
        },
        "organization_join_date": 0,
        "sub": "string",
        "teams": [
          {
            "authorized_oauth2_repo_manager_integrations": [
              "string"
            ],
            "connected_github_user": "string",
            "connected_github_user_url": "string",
            "gh_user_access_token": "string",
            "is_owner": true,
            "name": "string",
            "permissions": "string",
            "role": "string",
            "team_id": "string",
            "user_id": "string"
          }
        ],
        "timezone": "string",
        "user_scoped_recipe": "string"
      },
      "id": "string",
      "name": "string",
      "region": {
        "id": "string",
        "latitude": 0,
        "longitude": 0,
        "name": "string",
        "provided_by": "string",
        "slug": "string"
      },
      "size": 0,
      "status": "Creating",
      "team_id": "string",
      "usage": {},
      "volume_mounts": [
        {
          "mount_path": "string",
          "storage_volume_id": "string",
          "volume_sub_path": "string",
          "workload_id": "string",
          "workload_name": "string"
        }
      ]
    }
  ],
  "network": {
    "created_at": "2019-08-24T14:15:22Z",
    "display_name": "string",
    "hydra_network_name": "string",
    "id": "string",
    "team_id": "string"
  },
  "new_launch_version_available": true,
  "nickname": "string",
  "quickstart": {
    "description": "string",
    "id": "string",
    "name": "string",
    "recipe": "string",
    "tag": "string"
  },
  "recipe_deleted": true,
  "recipe_id": "string",
  "recipe_version": {
    "build": {
      "base_image": {
        "cli_image": "string",
        "display_image": "string",
        "image": "string"
      },
      "build_step_checks": [
        {
          "command": "string",
          "completed_at": "string",
          "error": "string",
          "is_cached": true,
          "is_user_step": true,
          "last_updated": "string",
          "logsrv_id": "string",
          "name": "string",
          "start_time": "string",
          "status": "pending",
          "step_id": "string"
        }
      ],
      "created_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "modified_at": "2019-08-24T14:15:22Z",
      "recipe_id": "string",
      "recipe_name": "string",
      "recipe_version_id": "string",
      "status": "Not Started",
      "team_id": "string",
      "user_id": "string"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "recipe": "string",
    "recipe_defaults": "string",
    "repos": [
      "string"
    ],
    "team_id": "string",
    "user": {
      "default_region": "string",
      "default_region_name": "string",
      "dora_connection_ids": [
        "string"
      ],
      "dxi_onboarding_checklist": {
        "analyze_own_code": "SKIPPED",
        "development_process_bottlenecks": "SKIPPED",
        "devzero_cli": "SKIPPED",
        "github_token": "SKIPPED",
        "is_dora_repository_connected": true
      },
      "email": "user@example.com",
      "given_name": "string",
      "id": "string",
      "is_global_admin": true,
      "linked_vcss": [
        {
          "link_metadata": "string",
          "vsc_uri": "string"
        }
      ],
      "onboarding_checklist": {
        "has_completed_onboarding": true,
        "has_completed_onboarding_checklist": true,
        "has_completed_recipe_quick_starters": true,
        "has_created_recipe": true,
        "has_dismissed_quickstart": true,
        "has_dismissed_recipe_callout": true,
        "has_forked_quickstart": true,
        "has_launched_workspace": true,
        "has_seen_github_app_modal": true,
        "has_seen_onboarding_recipe_modal": true,
        "onboarding_path": "undefined"
      },
      "organization_join_date": 0,
      "sub": "string",
      "teams": [
        {
          "authorized_oauth2_repo_manager_integrations": [
            "string"
          ],
          "connected_github_user": "string",
          "connected_github_user_url": "string",
          "gh_user_access_token": "string",
          "is_owner": true,
          "name": "string",
          "permissions": "string",
          "role": "string",
          "team_id": "string",
          "user_id": "string"
        }
      ],
      "timezone": "string",
      "user_scoped_recipe": "string"
    }
  },
  "region": "string",
  "region_name": "string",
  "status": "Building",
  "status_hint": "string",
  "team_id": "string",
  "user": {
    "default_region": "string",
    "default_region_name": "string",
    "dora_connection_ids": [
      "string"
    ],
    "dxi_onboarding_checklist": {
      "analyze_own_code": "SKIPPED",
      "development_process_bottlenecks": "SKIPPED",
      "devzero_cli": "SKIPPED",
      "github_token": "SKIPPED",
      "is_dora_repository_connected": true
    },
    "email": "user@example.com",
    "given_name": "string",
    "id": "string",
    "is_global_admin": true,
    "linked_vcss": [
      {
        "link_metadata": "string",
        "vsc_uri": "string"
      }
    ],
    "onboarding_checklist": {
      "has_completed_onboarding": true,
      "has_completed_onboarding_checklist": true,
      "has_completed_recipe_quick_starters": true,
      "has_created_recipe": true,
      "has_dismissed_quickstart": true,
      "has_dismissed_recipe_callout": true,
      "has_forked_quickstart": true,
      "has_launched_workspace": true,
      "has_seen_github_app_modal": true,
      "has_seen_onboarding_recipe_modal": true,
      "onboarding_path": "undefined"
    },
    "organization_join_date": 0,
    "sub": "string",
    "teams": [
      {
        "authorized_oauth2_repo_manager_integrations": [
          "string"
        ],
        "connected_github_user": "string",
        "connected_github_user_url": "string",
        "gh_user_access_token": "string",
        "is_owner": true,
        "name": "string",
        "permissions": "string",
        "role": "string",
        "team_id": "string",
        "user_id": "string"
      }
    ],
    "timezone": "string",
    "user_scoped_recipe": "string"
  },
  "workspace_recipe_summary": {
    "cpu": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "memory": "string",
    "name": "string",
    "repos": [
      "string"
    ],
    "storage": "string",
    "tags": {
      "origin": "quickstart"
    }
  }
}