---
search:
  tags:
    - Builds
    - GET
seo:
  description: >-
    text/event-stream. Frames: state (state or queue position changed), log (a…
    Reference for the GET /v1/builds/{id}/events endpoint in the Sproutboat
    Cloud API.
sidebar:
  label: Stream a build's log
  badge: GET
title: Stream a build's log
type: openapi-operation
---
`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.

`GET /v1/builds/{id}/events`
