Builds API
The Build resources allow you to retrieve information about the build history for an application.
Contents
List Build History
Retrieves a list of builds for the specified application,
ordered by created
in descending order. Item
properties match the build detail response
properties with the addition of the build detail URL.
Request
GET /applications/:slug/builds
Response
Status: 200 OK
[{
"status" : "Succeeded",
"created" : "2012-02-28T13:36:30",
"deployed" : "2012-02-28T13:37:30",
"branch" :
{
"name" : "foo",
"commit" :
{
"id" : "9f0fcea24cbb441c3ed848af3ccc5061d69cc7db",
"message" : "foo"
}
},
"download_url" : "https://appharbor.com/applications/:slug/builds/:build/download",
"tests_url" : "https://appharbor.com/applications/:slug/builds/:build/tests",
"url" : "https://appharbor.com/applications/:slug/builds/:id"
}]
Get Build Details
Request
GET /applications/:slug/builds/:id
Response
Status: 200 OK
{
"status" : "Succeeded",
"created" : "2012-02-28T13:36:30",
"deployed" : "2012-02-28T13:37:30",
"branch" :
{
"name" : "foo",
"commit" :
{
"id" : "9f0fcea24cbb441c3ed848af3ccc5061d69cc7db",
"message" : "foo"
}
},
"download_url" : "https://appharbor.com/applications/:application/builds/:build/download",
"tests_url" : "https://appharbor.com/applications/:application/builds/:build/tests",
"log_entries": [{
"created": "2012-02-28T13:36:30",
"message": "foo",
"details_url": "https://appharbor.com/applications/:application/builds/:build/logs/:log"
}]
}
Response Properties
status | The status of the build. Possible values are Succeeded, Queued, Building or Failed. |
created | The UTC date and time the build was created in and ISO 8601 format. |
deployed | The UTC date and time the build was created in and ISO 8601 format. |
branch | Details for the branch that triggered the build. |
download_url | The URL to download a tarball of the contents of the build. Requires OAuth credentials or web site authentication. |
tests_url | The URL of the associated Test detail resource. |
log_entries | Log entries for log messages for the build. `details_url` is null if there are no additional details |
Deploy
Trigger a specific build for deployment.
Request
POST /applications/:slug/builds/:build/deploy
Response
Status: 200 OK