Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Stream build logs

GET/v1/builds/{buildId}/logsStream build logs

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Streams the full build log for a build as newline-delimited JSON (application/x-ndjson). Each line is a JSON object discriminated by type: log (a build output line) or terminal (end-of-stream marker with a cursor for resumption). The default is a finite dump that ends once the stream is drained; pass follow=true to keep the connection open for an in-flight build, and cursor to resume from a prior terminal cursor.

Parameters

buildIdstringpathrequired

minLength 1

followstringquery

one of "true", "false"

one of "true", "false"

cursorstringquery

Responses

200Build log stream (newline-delimited JSON; one `BuildLogNdjsonLine` per line).application/x-ndjson
value
oneOf · 2 options
Option 1object
cursorstringrequired
levelstringrequired

one of "info", "error"

sourcestringrequired

one of "runner", "stdout", "stderr"

stepstring
textstringrequired
typestringrequired

const "log"

Option 2object
codestringrequired
cursornull | stringrequired
kindstringrequired

one of "end", "error"

messagestringrequired
retryablebooleanrequired
typestringrequired

const "terminal"

Example response
{
  "code": "string",
  "cursor": "string",
  "kind": "end",
  "message": "string",
  "retryable": true,
  "type": "terminal"
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Build not found, or the caller's workspace does not own it (indistinguishable).application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
429Rate limit exceeded.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu