POST /api/build/rebuild/:buildId
Re-runs the build pipeline using the commit hash recorded on an existing build. A new build record is inserted withstatus: "queued" and the pipeline starts immediately in the background. The original build record is not modified.
Requires JWT.
The rebuild copies the original build’s commit, branch, commitAuthor, commitHash, and projectId into the new record. This means a rebuild is always tied to the same snapshot of the repository — it does not re-fetch the latest commit.
Path parameters
Numeric ID of the existing build to re-run. Build IDs are returned in the
builds array of GET /api/project/projects.Curl example
Response
The server responds immediately with the new build record. The actual pipeline runs asynchronously after the response is sent.Response fields
The newly created build record.
Unique ID of the new build. Use this to poll
GET /api/build/:buildId or subscribe to buildStatusUpdate Socket.io events.Initial status. Always
queued immediately after creation.The commit hash that will be checked out for this build — identical to the original build’s hash.
null until the build completes. On completion, 0 means the build passed; any non-zero value means it failed.Rebuild runs asynchronously. Monitor progress in real time by subscribing to the
buildStatusUpdate Socket.io event, filtering by the new build’s id. The event is emitted each time the build status changes (queued → running → passed/failed).Error responses
| Status | Condition |
|---|---|
400 | buildId or user ID is missing |
401 | JWT is missing or invalid |
403 | The build’s project does not belong to the authenticated user |
404 | No build found with the given ID |
500 | Failed to insert the new build record |
GET /api/build/:buildId
Fetches a single build record by ID, including the nested project details. Use this to check a build’s final status and exit code after it completes, or to retrieve a snapshot of a build’s metadata. Requires JWT.Path parameters
Numeric ID of the build to fetch.
Curl example
Response
Response fields
The build record.
Unique build ID.
Current build status. One of
queued, running, passed, or failed.| Value | Meaning |
|---|---|
queued | Build is waiting to start |
running | Build pipeline is actively executing |
passed | Build completed successfully |
failed | Build exited with an error |
The commit message from the triggering push.
Branch the build was triggered on.
Name of the commit author as reported by GitHub.
Full SHA of the commit that was checked out for this build.
Exit code of the build container.
null while the build is running. 0 on success; any other value indicates a failure.ID of the project this build belongs to.
ISO 8601 timestamp of when the build record was created.
ISO 8601 timestamp of when the build completed.
null while running.Error responses
| Status | Condition |
|---|---|
400 | buildId or user ID is missing |
401 | JWT is missing or invalid |
403 | The build’s project does not belong to the authenticated user |
404 | No build found with the given ID |