Cancel, Retry or Approve
- PATCH
- /workspaces
- /:workspace
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /executions
- /:execution_id
Cancel, retry, or perform other operations on an execution
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