Stream a build's log
text/event-stream. Frames: state (state or queue position changed), log (a chunk of build output, id is
its sequence number), done (once, the final build object; the stream then ends) and error. A : keepalive
comment arrives every few seconds. Past logs are replayed from after, so to reconnect after a drop pass the
last id you saw as after (or as Last-Event-ID). The stream is closed by the server after 20 minutes
whatever the state: reconnect, or fall back to polling GET /v1/builds/{id}. The log of a build is kept to
256 KiB and ends with [log truncated at 256 KiB] beyond that.
/v1/builds/{id}/eventsAuthorizationBearer token · headerrequiredA team API key, sbk_..., from Settings, API keys.
x-api-keyAPI key · headerrequiredThe same key, in a header of its own.
idstring<uuid>requiredA build id (a UUID, from POST /v1/apps/{project}/builds).
afterintegerReplay only log chunks with a larger sequence number. Default 0.
Last-Event-IDintegerUsed when after is absent.
The event stream.
stringNo key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.
errorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerThe key lacks a grant (reason: forbidden, need: "<resource>:<action>").
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredforbiddenneedstringrequiredThe grant, as <resource>:<action>, for example app:write.
No such app, build, secret, manifest or claim in this team (another team's resource looks the same).
errorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerThe key is over its requests a minute (600, or 2,000 with app:write; reason: key-rate-limited, retry_after_s, Retry-After). Wait that long and retry.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredkey-rate-limitedretry_after_sintegerrequiredSeconds to wait; also the Retry-After header.