Run
- POST
- /workspaces
- /:domain
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /executions
Runs an execution of a pipeline.
Required scopes: WORKSPACE
, EXECUTION_RUN
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" } } ] }
STATUS200 OK
LIMITSX-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" } } ] }
STATUS200 OK
LIMITSX-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" } } ] }
STATUS200 OK
LIMITSX-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" } } ] }
STATUS200 OK
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999