Build API
Build API to start, monitor, cancel, and read logs for container image builds in Scalix Cloud, with every build scoped to your project.
REST API endpoints for Build. 6 operations.
List builds
GET /v1/buildReturns the builds for the caller's project.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | Build list |
401 | Missing or invalid API key |
500 | Internal error |
operationId: listBuilds
Start a build
POST /v1/buildStarts a container image build and returns the build record. For a private repository, either install the Scalix GitHub App for the project (builds then authenticate themselves) or pass auth_token.
Auth: Bearer API key
Request body
application/json (required) — schema BuildCreateRequest.
A source build to start.
| Field | Type | Required | Description |
|---|---|---|---|
source_type | string | Yes | Where the source comes from: git or tarball. |
source_url | string | null | No | Repository or archive URL. Must be reachable from the builder. |
source_ref | string | null | No | Branch, tag or commit to build. Defaults to main. This is the branch field: git_ref is not recognised and is ignored if sent. |
auth_token | string | null (password) | No | Credential for a private repository, used as the password in the clone URL. A fine-grained token with read-only Contents access on that one repository is enough. It is held in memory for the build only: never stored, never written to build logs or error messages. Omit this when the Scalix GitHub App is installed for the project - a short-lived installation token is then minted per build and injected automatically. |
dockerfile_path | string | null | No | Path to the Dockerfile within the source tree. Auto-detected if omitted. |
image_tag | string | null | No | Tag for the resulting image. Auto-generated if omitted. |
build_args | object | null | No | Build-time ARGs passed to the builder. Project environment variables are merged in as well; values sent here win. These are stored on the build record and readable back from GET /v1/build/{id}, so treat them as non-secret: use them for things like a public API base URL, not tokens. |
timeout_seconds | integer | null (int32) | No | Build timeout in seconds. Default 600, maximum 3600. |
Responses
| Status | Description |
|---|---|
200 | Build started |
401 | Missing or invalid API key |
500 | Internal error |
operationId: createBuild
Get a build
GET /v1/build/{id}Returns a single build by id.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Build id |
Responses
| Status | Description |
|---|---|
200 | Build details |
401 | Missing or invalid API key |
500 | Internal error |
operationId: getBuild
Cancel a build
POST /v1/build/{id}/cancelCancels an in-progress build.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Build id |
Responses
| Status | Description |
|---|---|
200 | Build cancelled |
401 | Missing or invalid API key |
500 | Internal error |
operationId: cancelBuild
Get build logs
GET /v1/build/{id}/logsReturns log output for a build.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Build id |
Responses
| Status | Description |
|---|---|
200 | Build logs |
401 | Missing or invalid API key |
500 | Internal error |
operationId: getBuildLogs
Upload source and build
POST /v1/build/uploadBuilds from an uploaded source tree instead of a URL, so the source never has to be reachable from the internet. The request body IS the gzipped tarball (Content-Type: application/gzip); metadata goes in the query string. Multipart is not accepted.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
image_tag | query | string | No | Tag for the resulting image. Auto-generated if omitted. |
dockerfile_path | query | string | No | Path to the Dockerfile within the uploaded tree. Auto-detected if omitted. |
build_args | query | string | No | Build-time ARGs as a url-encoded JSON object, e.g. {"VITE_API_URL":"https://api.example.com"} |
timeout_seconds | query | integer (int32) | No | Build timeout in seconds. Default 600, maximum 3600. |
Request body
Gzipped tarball of the source tree
application/gzip (required) — schema string.
Responses
| Status | Description |
|---|---|
201 | Build started |
400 | Body is empty, not a gzipped tarball, too large, or build_args is malformed |
401 | Missing or invalid API key |
500 | Internal error |
operationId: uploadBuild