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"
}
]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.
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.
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"
}
]Authorizations
Personal access token, sent as Authorization: Bearer <token>.
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.
When the line was logged, as a UTC timestamp in ISO 8601 format.
"2026-01-15T09:23:41.482000+00:00"
Severity of the line, such as info, warn, or error.
"info"
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.
"Sent welcome email to jane@acme.com"
Was this page helpful?