Log lines of the app's pods (at most 10 pods): the recent ones, or with `follow=true` a live stream of new ones.
const url = 'https://example.com/api/v1/projects/example/environments/example/apps/example/logs';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/projects/example/environments/example/apps/example/logsParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project name
Environment short name
App name
Query Parameters
Section titled “Query Parameters”Lines per pod (1–2000, default 200).
Only pods of this process.
Logs of the previous (crashed) container instance.
Keep the connection open and send new lines as text/event-stream:
line events (a [LogLine]) and an end event (a [LogEnd]) when a
pod’s log stops or the stream reaches its hour.
Responses
Section titled “Responses”Recent lines per pod; with follow, text/event-stream of line (LogLine) and end (LogEnd) events
object
Why no logs could be read (e.g. the container is still starting).
Examplegenerated
[ { "pod": "example", "process": "example", "lines": [ "example" ], "error": "example" }]Too many followed logs open
Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}