Run

  • POST
  • /workspaces
  • /:domain
  • /projects
  • /:project_name
  • /pipelines
  • /:pipeline_id
  • /executions

Runs an execution of a pipeline.

Required scopes: WORKSPACE, EXECUTION_RUN

Request

REQUIRED SCOPES
WORKSPACE, EXECUTION_RUN
URL PARAMETERS
domainrequired string
The workspace domain.
pipeline_idrequired integer
The numerical ID of the desired scenario.
project_namerequired string
The name ID of the project.
POST PARAMETERS
to_revisionrequired object
The object containing the revision field in which a revision or HEAD will be provided from the repository that will be executed in the pipeline.
variablesoptional Variables[]
The list of variables to set as parameters for the pipeline.
branchoptional object
The object containing the name field with the name of the branch to be executed when a pipeline has multiple refs or one of the refs is a wildcard.
tagoptional object
The object containing the name field with the name of the tag to be executed when a pipeline has multiple refs or one of the refs is a wildcard.
commentoptional string
Execution comment.
refreshoptional boolean
Deploy from scratch.
clear_cacheoptional boolean
Clear cache before running the pipeline.
priorityoptional string
Execution priority. Can be one of LOW, NORMAL or HIGH. Default is NORMAL.
actions_to_runoptional integer[]
Send the actions' IDs list to be run in this execution. If not sent, it will be run in accordance with the pipeline's definition.
delay_untiloptional iso 8601 utc date
The date when the execution should be run. Should be set in the format: 2016-11-18T12:38:16.000Z.
pull_requestoptional object
The object containing the name field with the name of the pull request to be executed when a pipeline has multiple refs or one of the refs is a wildcard.

Last modified on Sep 23, 2024

Example: 1

curl -X POST "https://api.buddy.works/workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/executions" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "to_revision": {
    "revision": "HEAD"
  },
  "comment": "hotfix",
  "clear_cache": true,
  "priority": "HIGH",
  "variables": [
    {
      "key": "version",
      "value": "1.0"
    },
    {
      "key": "pass",
      "value": "qwerty",
      "encrypted": true
    }
  ],
  "actions_to_run": [
    1,
    2
  ]
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/executions/3", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2/execution/56fa37f499f1e10c105fb388", "id": 3, "start_date": "2016-03-29T08:08:20.205Z", "finish_date": null, "priority": "HIGH", "triggeredOn": "CLICK", "refresh": false, "status": "INPROGRESS", "comment": "hotfix", "branch": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/branches/master", "html_url": "https://app.buddy.works/buddy/company-website/repository/branch/master", "name": "master", "default": true }, "from_revision": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08", "revision": "506a3963507943d6908154f4bc9646e829128a08", "author_date": "2016-01-19T12:36:33Z", "commit_date": "2016-01-19T12:36:33Z", "message": "init repo\n", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } }, "to_revision": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08", "revision": "506a3963507943d6908154f4bc9646e829128a08", "author_date": "2016-01-19T12:36:33Z", "commit_date": "2016-01-19T12:36:33Z", "message": "init repo\n", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } }, "creator": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "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": "dev", "on": "CLICK", "refs": [ "refs/heads/master" ], "last_execution_status": "INPROGRESS", "last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08" }, "action_executions": [ { "status": "INPROGRESS", "progress": 0, "action": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/5", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/5/edit", "id": 5, "name": "Upload files to dev", "type": "FTP", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INPROGRESS" } } ] }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: 2

curl -X POST "https://api.buddy.works/workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/executions" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "branch": {
    "name": "master"
  },
  "comment": "hotfix"
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/executions/3", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2/execution/56fa37f499f1e10c105fb388", "id": 3, "start_date": "2016-03-29T08:08:20.205Z", "finish_date": null, "priority": "HIGH", "triggeredOn": "CLICK", "refresh": false, "status": "INPROGRESS", "comment": "hotfix", "branch": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/branches/master", "html_url": "https://app.buddy.works/buddy/company-website/repository/branch/master", "name": "master", "default": true }, "from_revision": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08", "revision": "506a3963507943d6908154f4bc9646e829128a08", "author_date": "2016-01-19T12:36:33Z", "commit_date": "2016-01-19T12:36:33Z", "message": "init repo\n", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } }, "to_revision": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08", "revision": "506a3963507943d6908154f4bc9646e829128a08", "author_date": "2016-01-19T12:36:33Z", "commit_date": "2016-01-19T12:36:33Z", "message": "init repo\n", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } }, "creator": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "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": "dev", "on": "CLICK", "refs": [ "refs/heads/master" ], "last_execution_status": "INPROGRESS", "last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08" }, "action_executions": [ { "status": "INPROGRESS", "progress": 0, "action": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/5", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/5/edit", "id": 5, "name": "Upload files to dev", "type": "FTP", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INPROGRESS" } } ] }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: 3

curl -X POST "https://api.buddy.works/workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/executions" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "tag": {
    "name": "v1.0"
  },
  "comment": "hotfix"
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/executions/3", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2/execution/56fa37f499f1e10c105fb388", "id": 3, "start_date": "2016-03-29T08:08:20.205Z", "finish_date": null, "priority": "HIGH", "triggeredOn": "CLICK", "refresh": false, "status": "INPROGRESS", "comment": "hotfix", "branch": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/branches/master", "html_url": "https://app.buddy.works/buddy/company-website/repository/branch/master", "name": "master", "default": true }, "from_revision": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08", "revision": "506a3963507943d6908154f4bc9646e829128a08", "author_date": "2016-01-19T12:36:33Z", "commit_date": "2016-01-19T12:36:33Z", "message": "init repo\n", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } }, "to_revision": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08", "revision": "506a3963507943d6908154f4bc9646e829128a08", "author_date": "2016-01-19T12:36:33Z", "commit_date": "2016-01-19T12:36:33Z", "message": "init repo\n", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } }, "creator": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "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": "dev", "on": "CLICK", "refs": [ "refs/heads/master" ], "last_execution_status": "INPROGRESS", "last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08" }, "action_executions": [ { "status": "INPROGRESS", "progress": 0, "action": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/5", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/5/edit", "id": 5, "name": "Upload files to dev", "type": "FTP", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INPROGRESS" } } ] }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: 4

curl -X POST "https://api.buddy.works/workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/executions" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "pull_request": {
    "name": "pull/1"
  },
  "comment": "hotfix"
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/executions/3", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2/execution/56fa37f499f1e10c105fb388", "id": 3, "start_date": "2016-03-29T08:08:20.205Z", "finish_date": null, "priority": "HIGH", "triggeredOn": "CLICK", "refresh": false, "status": "INPROGRESS", "comment": "hotfix", "branch": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/branches/master", "html_url": "https://app.buddy.works/buddy/company-website/repository/branch/master", "name": "master", "default": true }, "from_revision": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08", "revision": "506a3963507943d6908154f4bc9646e829128a08", "author_date": "2016-01-19T12:36:33Z", "commit_date": "2016-01-19T12:36:33Z", "message": "init repo\n", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } }, "to_revision": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08", "revision": "506a3963507943d6908154f4bc9646e829128a08", "author_date": "2016-01-19T12:36:33Z", "commit_date": "2016-01-19T12:36:33Z", "message": "init repo\n", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } }, "creator": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "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": "dev", "on": "CLICK", "refs": [ "refs/heads/master" ], "last_execution_status": "INPROGRESS", "last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08" }, "action_executions": [ { "status": "INPROGRESS", "progress": 0, "action": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/5", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/5/edit", "id": 5, "name": "Upload files to dev", "type": "FTP", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INPROGRESS" } } ] }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999