Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Get deployment logs

GET/v1/deployments/{deploymentId}/logsGet deployment logs

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

Returns log output for the specified deployment. Each record is a JSON object with type: "log" (log text + byte metadata) or type: "terminal" (end-of-page signal with a resume cursor). A plain GET responds with newline-delimited JSON (application/x-ndjson): it drains the requested window (tail, from_start, or cursor), ends with a terminal record carrying the cursor for the next page, and closes. Send an Upgrade: websocket header to follow the log live instead; a live segment ends after 10 minutes with the same terminal/cursor mechanism.

Parameters

deploymentIdstringpathrequired

pattern ^(cpv_)?([cC][^\s-]{8,}|[a-z0-9]+)$

tailintegerquery

maximum 10000 · minimum 1

from_startstringquery

one of "true", "false"

one of "true", "false"

cursorstringquery

pattern ^\d+$

Responses

101WebSocket connection established (requests with an `Upgrade: websocket` header). Each message is a JSON object discriminated by `type`.
200One page of deployment logs (newline-delimited JSON; one record per line, ending with a terminal record).application/x-ndjson
value
oneOf · 2 options
Option 1object
byteEndintegerrequired
byteStartintegerrequired
textstringrequired
typestringrequired

const "log"

Option 2object
codestringrequired
cursornull | stringrequired
detailsobject
kindstringrequired

one of "end", "error"

messagestringrequired
retryablebooleanrequired
typestringrequired

const "terminal"

Example response
{
  "byteEnd": 0,
  "byteStart": 0,
  "text": "string",
  "type": "log"
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
403Insufficient permissions.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Deployment not found.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