Create new sandbox

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

Creates a new sandbox action in your pipeline. The action can create sandboxes from scratch (from: SCRATCH). All sandbox configuration parameters are defined in the spec field.

Request

URL PARAMETERS
workspacerequired string
The workspace name.
pipeline_idrequired integer
The numerical ID of the desired pipeline.
project_namerequired string
The name ID of the project.
POST PARAMETERS
namerequired string
The name of the action.
typerequired string
The type of the action. Must be set to SANDBOX_CREATE.
fromrequired string
The source for creating sandbox. Must be set to SCRATCH.
specrequired object
Sandbox configuration object containing all sandbox parameters.

Last modified on Sep 4, 2025

Example:

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "name": "Create new sandbox from Scratch",
  "type": "SANDBOX_CREATE",
  "trigger_time": "ON_EVERY_EXECUTION",
  "last_execution_status": "SUCCESSFUL",
  "disabled": false,
  "from": "SCRATCH",
  "ignore_errors": false,
  "run_next_parallel": false,
  "spec": {
    "sandbox": "create-sb",
    "name": "create new sandbox",
    "os": "ubuntu:24.04",
    "install_commands": "apt-get install -y nginx",
    "run_command": "nginx",
    "app_dir": "/var/www/html",
    "app_type": "SERVICE",
    "endpoints": [
      {
        "www": 80
      }
    ]
  }
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/my-project/pipelines/541034/actions/1673937", "html_url": "https://app.buddy.works/buddy/my-project/pipelines/pipeline/541034/action/1673937/edit", "id": 1673937, "name": "Create new sandbox from Scratch", "type": "SANDBOX_CREATE", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "disabled": false, "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/my-project/pipelines/541034", "html_url": "https://app.buddy.works/buddy/my-project/pipelines/pipeline/541034", "id": 541034, "identifier": "sandbox-api", "name": "Sandbox API", "definition_source": "LOCAL", "git_config_ref": "NONE", "refs": [ "refs/heads/main" ], "priority": "NORMAL", "disabled": false, "last_execution_status": "INITIAL", "always_from_scratch": false, "ignore_fail_on_project_status": false, "strict_context": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "auto_clear_cache": false, "fetch_all_refs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "stale": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X64", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS", "from": "SCRATCH", "spec": { "name": "create new sandbox", "os": "ubuntu:24.04", "resources": "2x4", "install_commands": "apt-get install -y nginx", "run_command": "nginx", "app_dir": "/var/www/html", "app_type": "SERVICE", "endpoints": [ { "type": "HTTP", "timeout": 30, "http": { "verify_certificate": false, "compression": false, "http2": false, "log_requests": false } } ] } }
STATUS
201 Created
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999