latestOpenAPI 3.0.32026-08-10152216352.3 KB

eea119b4113f

Runners Workspaces

Destroy workspace infrastructure resources

Initiates a destroy task to clean up cloud infrastructure resources managed by this workspace. This does not delete the workspace entity itself.

post/runners/workspaces/{workspaceId}/tasks/destroy

Path parameters

workspaceIdstring required

Unique identifier of the workspace

Request body

descriptionstring

Optional description for the task

taskIdstring

Optional ID of the task to run

cmdArgumentsstring

Optional command line arguments for the task

Example request

{
  "description": "Running infrastructure task",
  "vcs": {
    "reference": "main"
  },
  "trigger": {
    "type": "manual",
    "source": "Firefly"
  },
  "taskId": "task-12345",
  "cmdArguments": "-auto-approve"
}

Response

Destroy task initiated successfully

accountIdstring

ID of the account

idstring required

ID of the created task

status'pending' | 'running' | 'success' | 'failed' | 'canceled' required

Current status of the task

currentStep'plan' | 'post_plan' | 'apply' | 'post_apply'

Current step in the task execution

workspaceIdstring required

ID of the workspace the task is running on

type'plan' | 'apply' | 'destroy' required

Type of task that was executed

cmdArgumentsstring

Command line arguments used for the task

createdAtstring date-time

When the task was created

updatedAtstring date-time

When the task was last updated

Example response

{
  "vcs": {
    "reference": "main"
  }
}