Get function logs
Returns logs oldest first. type=runtime (default) returns function stdout/stderr. type=invocations returns one platform-generated record per HTTP request served.
GET
/
compute
/
funcs
/
{id}
/
logs
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.compute.funcs.retrieveLogs('id');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.compute.funcs.retrieve_logs(
"id",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Compute.Funcs.GetLogs(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.compute().funcs().retrieveLogs("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.compute.funcs.retrieve_logs("id")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->compute->funcs->retrieveLogs(
'id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx compute:funcs retrieve-logs \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/compute/funcs/{id}/logs \
--header 'Authorization: Bearer <token>'{
"meta": {
"has_more": false,
"partial": false
},
"data": [
{
"record_type": "compute_func_runtime_log",
"timestamp": "2026-09-09T16:00:00.000Z",
"level": "log",
"message": "Hello from Edge Compute!"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Function ID
Query Parameters
Log stream to return.
Available options:
runtime, invocations Return records at or after this RFC 3339 timestamp.
Return records at or before this RFC 3339 timestamp.
Maximum records to return.
Required range:
1 <= x <= 250Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.compute.funcs.retrieveLogs('id');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.compute.funcs.retrieve_logs(
"id",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Compute.Funcs.GetLogs(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.compute().funcs().retrieveLogs("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.compute.funcs.retrieve_logs("id")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->compute->funcs->retrieveLogs(
'id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx compute:funcs retrieve-logs \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/compute/funcs/{id}/logs \
--header 'Authorization: Bearer <token>'{
"meta": {
"has_more": false,
"partial": false
},
"data": [
{
"record_type": "compute_func_runtime_log",
"timestamp": "2026-09-09T16:00:00.000Z",
"level": "log",
"message": "Hello from Edge Compute!"
}
]
}