Duplicate existing 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_FROM_SANDBOX.
sandbox_namerequired string
Defines the name of the created sandbox.
sandbox_idrequired string
Defines the ID of the existing sandbox used to create new sandbox.
tagsstring[]
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_portrequired int
Defines the port used in the mapping.
subdomainrequired string
Defines the subdomain used in the mapping.
basic_authrequired boolean
If set to true, it allows you to use basic authorization in mappings.
mappings_usernamerequired string
Defines the basic auth username required to access the exposed resources.
mappings_passwordrequired string
Defines the basic auth password required to access the exposed resources.

Last modified on Sep 27, 2024

Example:

curl -X POST "https://api.buddy.works/workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "name": "Create new sandbox from existing",
  "type": "SANDBOX_CREATE_FROM_SANDBOX",
  "trigger_time": "ON_EVERY_EXECUTION",
  "tags": [
    "tag_1",
    "tag_2"
  ],
  "sandbox_name": "sandbox-buddy",
  "sandbox_id": "BJ7YnoUVtfGdo",
  "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"
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/2", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/2/edit", "id": 2, "name": "Create new sandbox from existing", "type": "SANDBOX_CREATE_FROM_SANDBOX", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "tags": [ "tag_1", "tag_2" ], "sandbox_name": "sandbox-buddy", "sandbox_id": "BJ7YnoUVtfGdo", "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", "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2", "id": 2, "name": "Live mirror", "refs": [ "refs/heads/master" ], "last_execution_status": "SUCCESSFUL", "last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08" } }
STATUS
201 Created
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999