Create new sandbox

  • POST
  • /workspaces
  • /:domain
  • /projects
  • /:project_name
  • /pipelines
  • /:pipeline_id
  • /actions

Request

url PARAMETERS
domainrequired string
The workspace domain.
pipeline_idrequired integer
The numerical ID of the desired pipeline.
project_namerequired string
The name ID of the project.
POST PARAMETERS
actionrequired string
The ID of the action.
typerequired string
The type of the action. Must be set to SANDBOX_CREATE_NEW.
sandbox_namerequired string
Defines the name of the created sandbox.
sandbox_distributionrequired string
Defines the OS distro of the sandbox. Can be one of ubuntu/focal or debian/buster.
sandbox_playbooksoptional SandboxPlaybook[]
Defines the list of playbooks to install during the sandbox creation.
typerequired string
The type of the installed playbook. Can be one of DOCKER, APACHE, NGINX, WORDPRESS, NODE, RUBY, MARIA, MYSQL, POSTGRES, MONGO, or REDIS.
dboptional string
The initial database name. Available when type is set to MARIA, WORDPRESS, POSTGRES, or MYSQL.
useroptional string
Defines the username used in the desired service. Available when type is set to MARIA, WORDPRESS, POSTGRES, or MYSQL.
passwordoptional string
Defines the password used in the desired service. Available when type is set to MARIA, WORDPRESS, POSTGRES, or MYSQL.
install_phpoptional string
Installs PHP if set to true. Available when type is set to APACHE, or NGINX.
php_versionoptional string[]
The PHP version of the installed playbook. Available when type is set to APACHE or NGINX.
php_modulesoptional string[]
The PHP modules of the installed playbook. Available when type is set to APACHE or NGINX.
modulesoptional string
The Apache modules of the installed playbook. Available when type is set to APACHE.
versionoptional string
The version of the installed playbook. Available when type is set to NODE, RUBY, MONGO, or MYSQL.
tagsoptional string[]
The list of tags applied to the sandbox.
ram_limitrequired int
Defines the amount of RAM available to the sandbox. Can be one of 2 or 4.
cpu_limitrequired int
Defines the number of vCPUs of the sandbox. Can be one of 1 or 2.
disk_size_limitrequired int
Defines the sandbox disk size. Expressed in GB. Can be one of 5 or 10.
mappingsrequired Mapping[]
Defines the port-subdomain mappings that allow to access exposed resources on the sandbox.
application_portoptional int
Defines the port used in the mapping.
subdomainoptional string
Defines the subdomain used in the mapping.
basic_authoptional boolean
If set to true, it allows you to use basic authorization in mappings.
mappings_usernameoptional string
Defines the basic auth username required to access the exposed resources.
mappings_passwordoptional string
Defines the basic auth password required to access the exposed resources.

Last modified on Sep 23, 2024

{
  "name": "Create new sandbox",
  "type": "SANDBOX_CREATE_NEW",
  "trigger_time": "ON_EVERY_EXECUTION",
  "last_execution_status": "SUCCESSFUL",
  "disabled": false,
  "sandbox_name": "new sandbox with playbooks",
  "ignore_errors": false,
  "run_next_parallel": false,
  "sandbox_distribution": "ubuntu/focal",
  "sandbox_playbooks": [
    {
      "type": "APACHE",
      "install_php": true,
      "php_version": "8.0",
      "php_modules": [
        "gd",
        "mysql",
        "opcache",
        "curl",
        "xml",
        "mbstring",
        "imagick",
        "zip"
      ],
      "modules": [
        "expires",
        "headers",
        "rewrite"
      ]
    },
    {
      "type": "DOCKER"
    },
    {
      "type": "MONGO",
      "version": "5.0"
    },
    {
      "type": "NODE",
      "version": "12"
    },
    {
      "type": "POSTGRES",
      "db": "test",
      "user": "test",
      "password": "test"
    },
    {
      "type": "REDIS"
    },
    {
      "type": "RUBY",
      "version": "2.7"
    },
    {
      "type": "MYSQL",
      "version": "8.0",
      "db": "wp",
      "user": "wp",
      "password": "wp"
    },
    {
      "type": "WORDPRESS",
      "db": "wp",
      "user": "wp",
      "password": "wp",
      "phrase": "wp"
    }
  ],
  "ram_limit": 2,
  "cpu_limit": 1,
  "disk_size_limit": 5,
  "mappings": [
    {
      "application_port": 80,
      "subdomain": "subdomain",
      "basic_auth": true
    }
  ],
  "mappings_username": "root",
  "mappings_password": "password"
}