Skip to main content
POST
Cancel an image build

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Makes the request retry-safe. Sail remembers the answer it sent under a key, including a 400 or a 409, and replays it with Idempotent-Replayed: true for a retry that repeats the key, the method, the path, and the body. Bodies are compared byte for byte. Reusing a key for a different request returns 409, so send a corrected request under a new key. A key that is blank or only spaces is ignored, and the request runs without idempotency.

Any string of up to 255 bytes works, and characters outside ASCII count for more than one. A UUID is a good default. Keys are remembered for at least 24 hours and scoped to the API key that sent them.

A server error, or a failure to record the answer, can leave a key unsettled, and creating a Sailbox is where that matters. See Retrying safely.

Maximum string length: 255

Path Parameters

build_id
string
required

Response

The build is cancelled.

build_id
string
required

Id of the build.

image_id
string
required

Id of the image the build produces.

status
string
required

A build is queued while it waits to start, then building, and it ends as ready, failed, or cancelled. Sail can add statuses later, so handle a value you do not recognize.

architecture
string
required

CPU architecture the image is built for.

created_at
string<date-time>
required

When the build was requested.

started_at
string<date-time> | null
required

When the build last started running. Null while the build is queued, and for a build that never ran.

finished_at
string<date-time> | null
required

When the build became ready, failed, or was cancelled. Null until then.

error_message
string | null
required

Why the build failed or was cancelled. Null for any other status.