---
title: "Get backend function logs"
method: GET
path: "/api/apps/{app_id}/functions-mgmt/{function_name}/logs"
---

# Get backend function logs

`GET /api/apps/{app_id}/functions-mgmt/{function_name}/logs`

## Request

- Base URL: `https://app.base44.com`
- URL: `https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs`
- Auth: HTTP bearer

<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>

## 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: 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: 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: End of the window, as an ISO 8601 timestamp. A timestamp without an offset is read as UTC. Defaults to now.
- `level` string: Keep only lines at this severity. Send `debug`, `info`, `warn`, or `error`, and `warning` is read as `warn`.
- `limit` integer: Maximum number of lines to return, from 1 to 500. Defaults to 500, and a larger value is treated as 500.

## Response `200`

The log lines, newest first.

- FunctionLogLine[]
  - `time` string, required: When the line was logged, as a UTC timestamp in ISO 8601 format.
  - `level` string, required: Severity of the line, such as `info`, `warn`, or `error`.
  - `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`.

## Other responses

- `400`: `since` or `until` isn't a valid timestamp, `since` isn't before `until`, or `level` isn't one of the accepted values.
- `401`: Missing or invalid credentials.
- `403`: You don't have access to this app, or you used a workspace API key.
- `404`: App not found.
- `422`: `limit` isn't a whole number.
- `429`: Too many requests for this app in the last minute from personal API keys in your workspace.

## Changes

> 58 revisions in range; 1 not diffed.

- **2026-10-21** `c23775445de2`: 6 breaking, 4 info
  - `query` request parameter `env` list-of-types was narrowed by removing types `null`
  - `query` request parameter `level` list-of-types was narrowed by removing types `null`
  - `query` request parameter `limit` list-of-types was narrowed by removing types `null`
  - `query` request parameter `since` list-of-types was narrowed by removing types `null`
  - …6 more
- **2026-10-12** `5e139db2e643`: 1 info
  - the endpoint scheme security `PersonalAccessTokenAuth` was added to the API
- **2026-09-29** `d2b7ac8beb0c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/adexad/apis/base44-app-management-api/changes/api/apps/:app_id/functions-mgmt/:function_name/logs/get.md)

---

[API](https://skmtc.dev/adexad/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/adexad/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adexad/apis/base44-app-management-api/revisions/fa29e915c226?raw)
