Cancel, Retry or Approve

View as Markdown
  • PATCH
  • /workspaces
  • /:workspace
  • /projects
  • /:project_name
  • /pipelines
  • /:pipeline_id
  • /executions
  • /:execution_id

Cancel, retry, or perform other operations on an execution

Request

REQUIRED SCOPES
PIPELINE_RUN
URL PARAMETERS
workspacerequiredstring
The human-readable ID of the workspace

Example: "my-company"

project_namerequiredstring
The human-readable ID of the project

Example: "my-project"

pipeline_idrequiredinteger
The ID of the pipeline

Example: 123

execution_idrequiredinteger
The ID of the execution

Example: 123456

BODY PARAMETERS
operationrequiredstring enum
The operation to perform on the execution
Allowed enum:
CANCEL,
RETRY,
APPLY,
APPLY_VARIABLES,
SET_VARIABLES,
RUN_DELAYED,
APPROVE_VT
variablesPassVariableRequest[]
The list of variables to set as parameters for the pipeline
approve_action_idstring
The action execution ID (or action ID) to approve

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
idinteger
The unique ID of the execution
start_datestring
The date and time when the execution started
finish_datestring
The date and time when the execution finished
triggered_onstring enum
The mode that triggered the execution
Allowed enum:
CLICK,
SCHEDULE,
EVENT,
PIPELINE,
WEBHOOK,
EMAIL
prioritystring enum
The priority of the execution. Default is NORMAL
Allowed enum:
LOW,
NORMAL,
HIGH
delay_untilstring
The date when the execution should be run. Should be set in the format: 2026-11-18T12:38:16.000Z
refreshboolean
Deploy from scratch
clear_cacheboolean
Clear cache before running the pipeline
statusstring enum
The current status of the execution
Allowed enum:
INPROGRESS,
ENQUEUED,
TERMINATED,
SUCCESSFUL,
FAILED,
INITIAL,
NOT_EXECUTED,
SKIPPED,
TERMINATING,
WAITING_FOR_APPLY,
WAITING_FOR_VARIABLES,
WAITING_FOR_SETTABLE_VARIABLES,
WAITING_FOR_VT_SESSION
commentstring
The comment or description provided for this execution
branchBranchView
tagTagView
pull_requestPullRequestView
from_revisionShortCommitView
The commit containing the revision field
to_revisionShortCommitView
The commit containing the revision field
creatorMemberView
User/member reference
environmentShortEnvironmentView
artifact_versionShortArtifactVersionView
Short representation of a artifact version for list views
loop_detailsExecutionLoopDetailsView
The loop details of the execution, if the pipeline was executed in a loop
pipelineShortPipelineView
Short representation of a pipeline
action_executionsShortActionExecutionView[]
The list of action executions within this pipeline execution
logs_removedboolean
Indicates whether the logs for this execution have been removed
executionsExecutionView[]
The list of pipeline executions
payload_filesPayloadFileView[]
The list of files uploaded for this run and placed in the pipeline filesystem before execution
artifactShortArtifactView
Short representation of a artifact object

Last modified on Nov 17, 2026

Examples

Example: Cancel execution

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/executions/:execution_id" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "operation": "CANCEL"
}'

Example: Retry execution

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/executions/:execution_id" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "operation": "RETRY"
}'

Example: Approve execution

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/executions/:execution_id" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "operation": "APPLY",
  "approve_action_id": "456"
}'

Example: Apply variables to execution

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/executions/:execution_id" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "operation": "APPLY_VARIABLES",
  "approve_action_id": "789",
  "variables": [
    {
      "key": "version",
      "value": "2.0"
    },
    {
      "key": "environment",
      "value": "production"
    }
  ]
}'
EXAMPLE RESPONSE
{
  "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/pipelines/2/executions/2",
  "html_url": "https://app.buddy.works/my-workspace/my-project/pipelines/pipeline/2/execution/68e60c55592ab1f894ecace6",
  "id": 2,
  "start_date": "2025-10-08T07:01:42.029Z",
  "finish_date": "2025-10-08T07:01:45.886Z",
  "triggered_on": "EVENT",
  "priority": "NORMAL",
  "refresh": true,
  "clear_cache": true,
  "status": "SUCCESSFUL",
  "comment": "test",
  "branch": {
    "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/branches/dev-issue1",
    "html_url": "https://app.buddy.works/my-workspace/my-project/repository/branch/dev-issue1",
    "name": "dev-issue1",
    "default": false
  },
  "to_revision": {
    "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/commits/90d11b5b54108fa57b30ae286322b99b26d46ccb",
    "html_url": "https://app.buddy.works/my-workspace/my-project/repository/commit/90d11b5b54108fa57b30ae286322b99b26d46ccb",
    "revision": "90d11b5b54108fa57b30ae286322b99b26d46ccb",
    "author_date": "2025-10-08T06:22:11Z",
    "commit_date": "2025-10-08T06:22:11Z",
    "message": "Added sad",
    "committer": {
      "url": "https://api.buddy.works/workspaces/my-workspace/members/1",
      "html_url": "https://app.buddy.works/my-workspace/-/profile/1",
      "id": 1,
      "name": "Mike",
      "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png?ts=1759904496204",
      "email": "mike@company.com",
      "admin": true,
      "workspace_owner": true
    },
    "author": {
      "url": "https://api.buddy.works/workspaces/my-workspace/members/1",
      "html_url": "https://app.buddy.works/my-workspace/-/profile/1",
      "id": 1,
      "name": "Mike",
      "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png?ts=1759904496204",
      "email": "mike@company.com",
      "admin": true,
      "workspace_owner": true
    }
  },
  "creator": {
    "url": "https://api.buddy.works/workspaces/my-workspace/members/1",
    "html_url": "https://app.buddy.works/my-workspace/-/profile/1",
    "id": 1,
    "name": "Mike",
    "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png?ts=1759904496204",
    "email": "mike@company.com",
    "admin": true,
    "workspace_owner": true
  },
  "environment": {
    "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/environments/nZrnl40Y",
    "html_url": "https://app.buddy.works/my-workspace/my-project/environments/environment/nZrnl40Y",
    "name": "staging",
    "identifier": "my-staging",
    "id": "nZrnl40Y",
    "scope": "PROJECT"
  },
  "artifact": {
    "url": "https://api.buddy.works/workspaces/my-workspace/artifacts/x5169jL2",
    "html_url": "https://app.buddy.works/my-workspace/-/artifacts/x5169jL2/versions",
    "id": "x5169jL2",
    "type": "CONTAINER",
    "name": "My Application Artifact",
    "identifier": "my-app-artifact",
    "scope": "WORKSPACE",
    "size": 1048576000
  },
  "artifact_version": {
    "url": "https://api.buddy.works/workspaces/my-workspace/artifacts/x5169jL2/versions/0YgEzRGv",
    "html_url": "https://app.buddy.works/my-workspace/-/artifacts/x5169jL2/versions/0YgEzRGv",
    "version_url": "https://latest-my-artifact.bucket-1.registry.sh/",
    "id": "0YgEzRGv",
    "version": "latest",
    "size": 1048576,
    "created_date": "2024-01-20T10:30:00Z"
  },
  "pipeline": {
    "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/pipelines/2",
    "html_url": "https://app.buddy.works/my-workspace/my-project/pipelines/pipeline/2",
    "id": 2,
    "identifier": "test",
    "name": "Tests",
    "definition_source": "LOCAL",
    "git_config_ref": "NONE",
    "refs": [
      "refs/heads/master"
    ],
    "events": [
      {
        "type": "PUSH",
        "refs": [
          ":context",
          "refs/heads/dev-*"
        ]
      }
    ],
    "priority": "NORMAL",
    "last_execution_status": "SUCCESSFUL",
    "last_execution_revision": "90d11b5b54108fa57b30ae286322b99b26d46ccb",
    "execution_message_template": "test",
    "always_from_scratch": true,
    "ignore_fail_on_project_status": true,
    "strict_context": false,
    "skip_queued_runs": "NEVER",
    "cancel_inprogress_runs": "NEVER",
    "auto_clear_cache": true,
    "fail_on_prepare_env_warning": true,
    "concurrent_pipeline_runs": true,
    "do_not_create_commit_status": true,
    "waiting_for_push": false,
    "resources": "DEFAULT",
    "git_changeset_base": "LATEST_RUN_MATCHING_REF",
    "filesystem_changeset_base": "CONTENTS",
    "cpu": "X64",
    "description_required": false
  },
  "action_executions": [
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/pipelines/2/executions/2/action_executions/68e60c55592ab1f894ecace8",
      "html_url": "https://app.buddy.works/my-workspace/my-project/pipelines/pipeline/2/execution/68e60c55592ab1f894ecace6/?actionExecutionId=68e60c55592ab1f894ecace8",
      "action_execution_id": "68e60c55592ab1f894ecace8",
      "start_date": "2025-10-08T07:01:42.67Z",
      "finish_date": "2025-10-08T07:01:45.861Z",
      "status": "SUCCESSFUL",
      "progress": 100,
      "action": {
        "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/pipelines/2/actions/1",
        "html_url": "https://app.buddy.works/my-workspace/my-project/pipelines/pipeline/2/action/1/edit",
        "id": 1,
        "name": "ls -la",
        "type": "BUILD",
        "current_revision": "90d11b5b54108fa57b30ae286322b99b26d46ccb",
        "trigger_time": "ON_EVERY_EXECUTION",
        "run_next": "WAIT_ON_SUCCESS",
        "disabled": false,
        "timeout": null,
        "ignore_errors": false,
        "last_execution_status": "SUCCESSFUL"
      },
      "passed_variables": [],
      "outputted_variables": []
    }
  ]
}
STATUS
200 OK