A build is one run of a pipeline. Each build has a number unique within
its pipeline (the URL key) and a stable id UUID. Its aggregate state —
scheduled, running, passed, failed, canceled, skipped — rolls
up from the states of its jobs.
These endpoints trigger a build, read it, cancel a running one, list its artifacts, and mint the short-lived token the browser uses to stream live logs. The jobs that make up a build live under Jobs.
Create a build by repo + source slug
Authorization
bearer A Harmont session bearer token.
In: header
Path Parameters
The organization slug.
Request Body
application/json
Build attributes
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.harmont.dev/api/v0/organizations/string/builds" \ -H "Content-Type: application/json" \ -d '{ "branch": "string", "commit": "string", "repo_name": "string", "source_slug": "string" }'{
"branch": "string",
"commit": "string",
"created_at": "2019-08-24T14:15:22Z",
"error_code": "string",
"error_message": "string",
"finished_at": "2019-08-24T14:15:22Z",
"message": "string",
"number": 0,
"pipeline_slug": "string",
"scheduled_at": "2019-08-24T14:15:22Z",
"source": "string",
"started_at": "2019-08-24T14:15:22Z",
"state": "scheduled"
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}List a pipeline's builds
Authorization
bearer A Harmont session bearer token.
In: header
Path Parameters
The organization slug.
The pipeline slug.
Query Parameters
Page size (1–100, default 50).
Opaque cursor from a previous page's next_cursor.
Response Body
application/json
application/json
curl -X GET "https://api.harmont.dev/api/v0/organizations/string/pipelines/string/builds"{
"data": [
{
"branch": "string",
"commit": "string",
"created_at": "2019-08-24T14:15:22Z",
"error_code": "string",
"error_message": "string",
"finished_at": "2019-08-24T14:15:22Z",
"message": "string",
"number": 0,
"pipeline_slug": "string",
"scheduled_at": "2019-08-24T14:15:22Z",
"source": "string",
"started_at": "2019-08-24T14:15:22Z",
"state": "scheduled"
}
],
"next_cursor": "string"
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}Create a build
Authorization
bearer A Harmont session bearer token.
In: header
Path Parameters
The organization slug.
The pipeline slug.
Request Body
application/json
Build attributes
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.harmont.dev/api/v0/organizations/string/pipelines/string/builds" \ -H "Content-Type: application/json" \ -d '{ "branch": "string", "commit": "string" }'{
"branch": "string",
"commit": "string",
"created_at": "2019-08-24T14:15:22Z",
"error_code": "string",
"error_message": "string",
"finished_at": "2019-08-24T14:15:22Z",
"message": "string",
"number": 0,
"pipeline_slug": "string",
"scheduled_at": "2019-08-24T14:15:22Z",
"source": "string",
"started_at": "2019-08-24T14:15:22Z",
"state": "scheduled"
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}Get a build
Authorization
bearer A Harmont session bearer token.
In: header
Path Parameters
The organization slug.
The pipeline slug.
The build number.
Response Body
application/json
application/json
curl -X GET "https://api.harmont.dev/api/v0/organizations/string/pipelines/string/builds/0"{
"branch": "string",
"commit": "string",
"created_at": "2019-08-24T14:15:22Z",
"error_code": "string",
"error_message": "string",
"finished_at": "2019-08-24T14:15:22Z",
"message": "string",
"number": 0,
"pipeline_slug": "string",
"scheduled_at": "2019-08-24T14:15:22Z",
"source": "string",
"started_at": "2019-08-24T14:15:22Z",
"state": "scheduled"
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}Cancel a build
Authorization
bearer A Harmont session bearer token.
In: header
Path Parameters
The organization slug.
The pipeline slug.
The build number.
Response Body
application/json
application/json
curl -X PUT "https://api.harmont.dev/api/v0/organizations/string/pipelines/string/builds/0/cancel"{
"branch": "string",
"commit": "string",
"created_at": "2019-08-24T14:15:22Z",
"error_code": "string",
"error_message": "string",
"finished_at": "2019-08-24T14:15:22Z",
"message": "string",
"number": 0,
"pipeline_slug": "string",
"scheduled_at": "2019-08-24T14:15:22Z",
"source": "string",
"started_at": "2019-08-24T14:15:22Z",
"state": "scheduled"
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}Mint a build-scoped log token
Authorization
bearer A Harmont session bearer token.
In: header
Path Parameters
The organization slug.
The pipeline slug.
The build number.
Response Body
application/json
application/json
curl -X GET "https://api.harmont.dev/api/v0/organizations/string/pipelines/string/builds/0/log-token"{
"expires_at": "2019-08-24T14:15:22Z",
"token": "string"
}{
"error": {
"code": "string",
"doc_url": "string",
"message": "string",
"request_id": "string",
"type": "string"
}
}