POST
/
organizations
/
{organization}
/
members
/
{user}
/
workspaces
curl --request POST \
  --url https://cloud.local.wirtual.dev/api/v2/organizations/{organization}/members/{user}/workspaces \
  --header 'Content-Type: application/json' \
  --header 'Wirtual-Session-Token: <api-key>' \
  --data '{
  "automatic_updates": "always",
  "autostart_schedule": "<string>",
  "name": "<string>",
  "rich_parameter_values": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "template_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ttl_ms": 123
}'
{
  "allow_renames": true,
  "automatic_updates": "<any>",
  "autostart_schedule": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "deleting_at": "2023-11-07T05:31:56Z",
  "dormant_at": "2023-11-07T05:31:56Z",
  "favorite": true,
  "health": {
    "failing_agents": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ],
    "healthy": false
  },
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "last_used_at": "2023-11-07T05:31:56Z",
  "latest_build": {
    "build_number": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "daily_cost": 123,
    "deadline": "2023-11-07T05:31:56Z",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "initiator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "initiator_name": "<string>",
    "job": {
      "canceled_at": "2023-11-07T05:31:56Z",
      "completed_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "error": "<string>",
      "error_code": "<any>",
      "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "queue_position": 123,
      "queue_size": 123,
      "started_at": "2023-11-07T05:31:56Z",
      "status": "<any>",
      "tags": {},
      "worker_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    },
    "max_deadline": "2023-11-07T05:31:56Z",
    "reason": "<any>",
    "resources": [
      {
        "agents": [
          {
            "api_version": "<string>",
            "apps": [
              {
                "command": "<string>",
                "display_name": "<string>",
                "external": true,
                "health": "disabled",
                "healthcheck": {
                  "interval": 123,
                  "threshold": 123,
                  "url": "<string>"
                },
                "hidden": true,
                "icon": "<string>",
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "sharing_level": "<any>",
                "slug": "<string>",
                "subdomain": true,
                "subdomain_name": "<string>",
                "url": "<string>"
              }
            ],
            "architecture": "<string>",
            "connection_timeout_seconds": 123,
            "created_at": "2023-11-07T05:31:56Z",
            "directory": "<string>",
            "disconnected_at": "2023-11-07T05:31:56Z",
            "display_apps": [
              "vscode"
            ],
            "environment_variables": {},
            "expanded_directory": "<string>",
            "first_connected_at": "2023-11-07T05:31:56Z",
            "health": {
              "healthy": false,
              "reason": "agent has lost connection"
            },
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "instance_id": "<string>",
            "last_connected_at": "2023-11-07T05:31:56Z",
            "latency": {},
            "lifecycle_state": "created",
            "log_sources": [
              {
                "created_at": "2023-11-07T05:31:56Z",
                "display_name": "<string>",
                "icon": "<string>",
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "workspace_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
              }
            ],
            "logs_length": 123,
            "logs_overflowed": true,
            "name": "<string>",
            "operating_system": "<string>",
            "ready_at": "2023-11-07T05:31:56Z",
            "resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "scripts": [
              {
                "cron": "<string>",
                "display_name": "<string>",
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "log_path": "<string>",
                "log_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "run_on_start": true,
                "run_on_stop": true,
                "script": "<string>",
                "start_blocks_login": true,
                "timeout": 123
              }
            ],
            "started_at": "2023-11-07T05:31:56Z",
            "startup_script_behavior": "<any>",
            "status": "connecting",
            "subsystems": [
              "envbox"
            ],
            "troubleshooting_url": "<string>",
            "updated_at": "2023-11-07T05:31:56Z",
            "version": "<string>"
          }
        ],
        "created_at": "2023-11-07T05:31:56Z",
        "daily_cost": 123,
        "hide": true,
        "icon": "<string>",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "metadata": [
          {
            "key": "<string>",
            "sensitive": true,
            "value": "<string>"
          }
        ],
        "name": "<string>",
        "type": "<string>",
        "workspace_transition": "<any>"
      }
    ],
    "status": "<any>",
    "template_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "template_version_name": "<string>",
    "transition": "<any>",
    "updated_at": "2023-11-07T05:31:56Z",
    "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "workspace_name": "<string>",
    "workspace_owner_avatar_url": "<string>",
    "workspace_owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "workspace_owner_name": "<string>"
  },
  "name": "<string>",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organization_name": "<string>",
  "outdated": true,
  "owner_avatar_url": "<string>",
  "owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "owner_name": "<string>",
  "template_active_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "template_allow_user_cancel_workspace_jobs": true,
  "template_display_name": "<string>",
  "template_icon": "<string>",
  "template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "template_name": "<string>",
  "template_require_active_version": true,
  "ttl_ms": 123,
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Wirtual-Session-Token
string
header
required

Path Parameters

organization
string
required

Organization ID

user
string
required

Username, UUID, or me

Body

application/json
Create workspace request

CreateWorkspaceRequest provides options for creating a new workspace. Only one of TemplateID or TemplateVersionID can be specified, not both. If TemplateID is specified, the active version of the template will be used.

name
string
required
automatic_updates
enum<string>
Available options:
always,
never
autostart_schedule
string
rich_parameter_values
object[]

RichParameterValues allows for additional parameters to be provided during the initial provision.

template_id
string

TemplateID specifies which template should be used for creating the workspace.

template_version_id
string

TemplateVersionID can be used to specify a specific version of a template for creating the workspace.

ttl_ms
integer

Response

200 - application/json
OK
allow_renames
boolean
automatic_updates
any
autostart_schedule
string
created_at
string
deleting_at
string

DeletingAt indicates the time at which the workspace will be permanently deleted. A workspace is eligible for deletion if it is dormant (a non-nil dormant_at value) and a value has been specified for time_til_dormant_autodelete on its template.

dormant_at
string

DormantAt being non-nil indicates a workspace that is dormant. A dormant workspace is no longer accessible must be activated. It is subject to deletion if it breaches the duration of the time_til_ field on its template.

favorite
boolean
health
object

Health shows the health of the workspace and information about what is causing an unhealthy status.

id
string
last_used_at
string
latest_build
object
name
string
organization_id
string
organization_name
string
outdated
boolean
owner_avatar_url
string
owner_id
string
owner_name
string
template_active_version_id
string
template_allow_user_cancel_workspace_jobs
boolean
template_display_name
string
template_icon
string
template_id
string
template_name
string
template_require_active_version
boolean
ttl_ms
integer
updated_at
string