POST /builds/{job_id}/cancel
Cancel a build before it starts
API key (Bearer), on the public API endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
job_id | path | string · required |
Responses
| Status | Description | Body |
|---|---|---|
200 | Build cancelled | BuildResponse |
403 | scope_missing (build:cancel) | |
404 | build_not_found | |
409 | build_terminal |
Examples
curl
curl -X POST "$GALON_API_BASE/builds/<job_id>/cancel" \
-H "Authorization: Bearer $GALON_API_KEY"Node.js (SDK)
import { Galon } from "galon";
const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.builds.cancel("<id>");Python (SDK)
from galon import Galon
galon = Galon() # reads GALON_API_KEY
result = galon.builds.cancel("<id>")