Skip to main content
GET
Get backend function logs

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>.

Path Parameters

function_name
string
required

Name of the backend function, without a file extension. Nested functions have slashes in their name, and you send those as they are.

app_id
string
required

ID of the app the function belongs to.

Query Parameters

env
string | null

Whose traffic to show. prod returns lines from the deployment serving the published app, and preview returns lines from the builder's preview. Leave it out for every line from the function's latest deployment. Any other value is ignored.

since
string | null

Start of the window, as an ISO 8601 timestamp. A timestamp without an offset is read as UTC. Defaults to 7 days before until.

until
string | null

End of the window, as an ISO 8601 timestamp. A timestamp without an offset is read as UTC. Defaults to now.

level
string | null

Keep only lines at this severity. Send debug, info, warn, or error, and warning is read as warn.

limit
integer | null

Maximum number of lines to return, from 1 to 500. Defaults to 500, and a larger value is treated as 500.

Response

The log lines, newest first.

time
string
required

When the line was logged, as a UTC timestamp in ISO 8601 format.

Example:

"2026-01-15T09:23:41.482000+00:00"

level
string
required

Severity of the line, such as info, warn, or error.

Example:

"info"

message
string
required

What the function wrote. An uncaught error carries its name, message and stack trace. Each invocation also gets a line of its own with the request method and response status, like POST → 200.

Example:

"Sent welcome email to jane@acme.com"