curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"time": "2026-01-15T09:23:41.482000+00:00",
"level": "info",
"message": "Sent welcome email to jane@acme.com"
}
]{
"error": {
"code": "function_logs_unavailable",
"message": "The function log store did not answer. Try again.",
"details": {}
}
}{
"error": {
"code": "database_unavailable",
"message": "Database temporarily unavailable, please retry",
"details": {}
}
}Get backend function logs
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.
Set branch_id to read a branch’s logs. A function the branch deployed returns the lines from the branch’s own deployment, a function the branch deleted returns an empty list, and any other function returns main’s lines. With env set to prod, you always get the published app’s lines, because the app is published from main.
This is limited to 60 requests a minute per app for each workspace’s personal API keys, so every personal API key in a workspace shares one allowance, and each workspace API key has its own. Some workspaces have a different limit.
curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/functions-mgmt/{function_name}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"time": "2026-01-15T09:23:41.482000+00:00",
"level": "info",
"message": "Sent welcome email to jane@acme.com"
}
]{
"error": {
"code": "function_logs_unavailable",
"message": "The function log store did not answer. Try again.",
"details": {}
}
}{
"error": {
"code": "database_unavailable",
"message": "Database temporarily unavailable, please retry",
"details": {}
}
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Scopes
Path Parameters
Query Parameters
ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.
Response
The log lines, newest first.
Was this page helpful?