{"_id":"590a04f5ed80861900cbc77b","project":"55b2d5baa74a380d00e290c4","user":"55b2d5626862a10d00887af9","version":{"_id":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","__v":4,"createdAt":"2017-05-03T16:27:30.085Z","releaseDate":"2017-05-03T16:27:30.085Z","categories":["590a04f3ed80861900cbc738","590a04f3ed80861900cbc739","590a04f3ed80861900cbc73a","590a04f3ed80861900cbc73b","590a04f3ed80861900cbc73c","590a04f3ed80861900cbc73d","590a04f3ed80861900cbc73e","590a04f3ed80861900cbc73f","590a04f3ed80861900cbc740","590a04f3ed80861900cbc741","590a04f3ed80861900cbc742","590a04f3ed80861900cbc743","590a04f3ed80861900cbc744","590a04f3ed80861900cbc745","590a04f3ed80861900cbc746","590a04f3ed80861900cbc747","590a04f3ed80861900cbc748","590a04f3ed80861900cbc749","590a04f3ed80861900cbc74a","590a04f3ed80861900cbc74b","590a04f3ed80861900cbc74c","590a04f3ed80861900cbc74d","59124949de13f61900336a7a","5914b04e7c2c552d008b7104","5914b47242c6a22300b9dc20"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"7.0.0","version":"7"},"parentDoc":null,"category":{"_id":"590a04f3ed80861900cbc73a","__v":0,"project":"55b2d5baa74a380d00e290c4","version":"590a04f2ed80861900cbc737","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-04-22T20:33:51.487Z","from_sync":false,"order":2,"slug":"rest-api","title":"REST API"},"__v":0,"updates":["5877c54c511a4e2500f91d60"],"next":{"pages":[],"description":""},"createdAt":"2016-04-22T20:39:28.969Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"curl","code":"curl -X POST \\\n    -H 'Authorization: Bearer {{access_token}}' \\\n    'https://api.buddybuild.com/v1/apps/{{app_id}}/build' \\\n    --data \"master\""}]},"method":"post","results":{"codes":[{"status":200,"name":"","code":"{\n  \"build_id\": \"571a68649d3b8171c5ef489f\"\n}","language":"json"}]},"settings":"","auth":"required","params":[{"_id":"571ec66acb4baa0e00d1390f","ref":"","in":"path","required":true,"desc":"App identifier","default":"","type":"string","name":"app_id"},{"_id":"571a8f6e47ac40170010cc73","ref":"","in":"body","required":false,"desc":"Branch name","default":"","type":"string","name":"branch"}],"url":"/apps/:app_id/build"},"isReference":true,"order":8,"body":"This API allows you to trigger a build from the tip of a branch. You can also pass in a specific branch name. If you don't pass in a branch name, buddybuild will use the default branch.\n\nOnce the build is queued, we will return the ID of the new build.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Read more about [authenticating with buddybuild](http://docs.buddybuild.com/docs/api-developer-guide#authentication) or show <a href=\\\"https://dashboard.buddybuild.com/account/access-token\\\" target=\\\"_blank\\\">your personal access token</a>.\",\n  \"title\": \"Looking for your API access token?\"\n}\n[/block]","excerpt":"","slug":"trigger-a-build","type":"post","title":"Trigger a build"}

postTrigger a build


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

app_id:
required
string
App identifier

Body Params

branch:
string
Branch name

Examples


Result Format


Documentation

This API allows you to trigger a build from the tip of a branch. You can also pass in a specific branch name. If you don't pass in a branch name, buddybuild will use the default branch. Once the build is queued, we will return the ID of the new build. [block:callout] { "type": "info", "body": "Read more about [authenticating with buddybuild](http://docs.buddybuild.com/docs/api-developer-guide#authentication) or show <a href=\"https://dashboard.buddybuild.com/account/access-token\" target=\"_blank\">your personal access token</a>.", "title": "Looking for your API access token?" } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}