Get backend function logs
Changed on<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Returns recent log lines from one of the app's backend functions, newest first.
A line is anything the function wrote to the console, plus the errors it didn't catch. The lines hold whatever the function logged, so they can include data about the app's users.
By default you get up to 500 lines from the last 7 days. Set since and until to pick a different window, level to keep one severity, and limit for fewer lines. Logs are kept for a limited time, so a window far in the past can come back empty.
To page back, send the time of the oldest line you have, plus one millisecond, as until, and drop the lines you already have. Several lines can share a millisecond, and this keeps you from skipping any.
A function that doesn't exist, or that has never run, returns an empty list rather than an error.
Some older apps whose functions haven't moved to Base44's current function runtime can window and filter their lines differently.
This is limited to 60 requests a minute per app for each workspace's personal API keys, so every key in a workspace shares one allowance. Some workspaces have a different limit.
<Note>This endpoint accepts a personal API key, including a read-only one, from anyone with access to the app, viewers included. Workspace API keys are not authorized for it.</Note>
Request
- Base URL: https://app.base44.com
- URL: https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs
- Auth: HTTP bearer
Path parameters
Name of the backend function, without a file extension. Nested functions have slashes in their name, and you send those as they are.
ID of the app the function belongs to.
Query parameters
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.
Start of the window, as an ISO 8601 timestamp. A timestamp without an offset is read as UTC. Defaults to 7 days before until.
End of the window, as an ISO 8601 timestamp. A timestamp without an offset is read as UTC. Defaults to now.
Keep only lines at this severity. Send debug, info, warn, or error, and warning is read as warn.
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.
Example response
[
{
"time": "2026-01-15T09:23:41.482000+00:00",
"level": "info",
"message": "Sent welcome email to jane@acme.com"
}
]Changes
- breaking
queryrequest parameterenvlist-of-types was narrowed by removing typesnull - breaking
queryrequest parameterlevellist-of-types was narrowed by removing typesnull - breaking
queryrequest parameterlimitlist-of-types was narrowed by removing typesnull - breaking
queryrequest parametersincelist-of-types was narrowed by removing typesnull - breaking
queryrequest parameteruntillist-of-types was narrowed by removing typesnull - breaking
for the
queryrequest parameterlimit, the type changed from no type tointeger - info
for the
queryrequest parameterenv, the type was generalized from no type tostring - info
for the
queryrequest parameterlevel, the type was generalized from no type tostring - info
for the
queryrequest parametersince, the type was generalized from no type tostring - info
for the
queryrequest parameteruntil, the type was generalized from no type tostring
- breaking
- info
the endpoint scheme security
PersonalAccessTokenAuthwas added to the API
- info