Search centralized logs
curl --request POST \
--url https://towbar-api.example.com/v1/api/logs/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"workloadIds": [],
"serverIds": [],
"deploymentIds": [],
"previewIds": [],
"containerIds": [],
"environments": [],
"services": [],
"severities": [],
"search": "",
"traceId": "<string>",
"attributes": []
},
"limit": 50,
"cursor": "<string>",
"direction": "older"
}
'import requests
url = "https://towbar-api.example.com/v1/api/logs/query"
payload = {
"filters": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"workloadIds": [],
"serverIds": [],
"deploymentIds": [],
"previewIds": [],
"containerIds": [],
"environments": [],
"services": [],
"severities": [],
"search": "",
"traceId": "<string>",
"attributes": []
},
"limit": 50,
"cursor": "<string>",
"direction": "older"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
workloadIds: [],
serverIds: [],
deploymentIds: [],
previewIds: [],
containerIds: [],
environments: [],
services: [],
severities: [],
search: '',
traceId: '<string>',
attributes: []
},
limit: 50,
cursor: '<string>',
direction: 'older'
})
};
fetch('https://towbar-api.example.com/v1/api/logs/query', 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://towbar-api.example.com/v1/api/logs/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z',
'workloadIds' => [
],
'serverIds' => [
],
'deploymentIds' => [
],
'previewIds' => [
],
'containerIds' => [
],
'environments' => [
],
'services' => [
],
'severities' => [
],
'search' => '',
'traceId' => '<string>',
'attributes' => [
]
],
'limit' => 50,
'cursor' => '<string>',
'direction' => 'older'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://towbar-api.example.com/v1/api/logs/query"
payload := strings.NewReader("{\n \"filters\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"workloadIds\": [],\n \"serverIds\": [],\n \"deploymentIds\": [],\n \"previewIds\": [],\n \"containerIds\": [],\n \"environments\": [],\n \"services\": [],\n \"severities\": [],\n \"search\": \"\",\n \"traceId\": \"<string>\",\n \"attributes\": []\n },\n \"limit\": 50,\n \"cursor\": \"<string>\",\n \"direction\": \"older\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://towbar-api.example.com/v1/api/logs/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"workloadIds\": [],\n \"serverIds\": [],\n \"deploymentIds\": [],\n \"previewIds\": [],\n \"containerIds\": [],\n \"environments\": [],\n \"services\": [],\n \"severities\": [],\n \"search\": \"\",\n \"traceId\": \"<string>\",\n \"attributes\": []\n },\n \"limit\": 50,\n \"cursor\": \"<string>\",\n \"direction\": \"older\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://towbar-api.example.com/v1/api/logs/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"workloadIds\": [],\n \"serverIds\": [],\n \"deploymentIds\": [],\n \"previewIds\": [],\n \"containerIds\": [],\n \"environments\": [],\n \"services\": [],\n \"severities\": [],\n \"search\": \"\",\n \"traceId\": \"<string>\",\n \"attributes\": []\n },\n \"limit\": 50,\n \"cursor\": \"<string>\",\n \"direction\": \"older\"\n}"
response = http.request(request)
puts response.read_body{
"accessRevision": "<string>",
"followCursor": "<string>",
"records": [
{
"eventId": "<string>",
"timestamp": "<string>",
"ingestedAt": "<string>",
"serverId": "<string>",
"workloadId": "<string>",
"workloadName": "<string>",
"deploymentId": "<string>",
"previewId": "<string>",
"environment": "production",
"containerId": "<string>",
"service": "<string>",
"severity": "unknown",
"stream": "stderr",
"body": "<string>",
"attributes": {},
"traceId": "<string>",
"spanId": "<string>",
"truncated": true
}
],
"nextCursor": "<string>",
"hasMore": true,
"partial": true,
"snapshotAt": "<string>",
"localization": {
"dateFormat": "day-short-month-year",
"timeFormat": "24-hour",
"timeZone": "<string>",
"timestamps": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}Search centralized logs
Search centralized logs through the Towbar REST API.
POST
/
logs
/
query
Search centralized logs
curl --request POST \
--url https://towbar-api.example.com/v1/api/logs/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"workloadIds": [],
"serverIds": [],
"deploymentIds": [],
"previewIds": [],
"containerIds": [],
"environments": [],
"services": [],
"severities": [],
"search": "",
"traceId": "<string>",
"attributes": []
},
"limit": 50,
"cursor": "<string>",
"direction": "older"
}
'import requests
url = "https://towbar-api.example.com/v1/api/logs/query"
payload = {
"filters": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"workloadIds": [],
"serverIds": [],
"deploymentIds": [],
"previewIds": [],
"containerIds": [],
"environments": [],
"services": [],
"severities": [],
"search": "",
"traceId": "<string>",
"attributes": []
},
"limit": 50,
"cursor": "<string>",
"direction": "older"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
workloadIds: [],
serverIds: [],
deploymentIds: [],
previewIds: [],
containerIds: [],
environments: [],
services: [],
severities: [],
search: '',
traceId: '<string>',
attributes: []
},
limit: 50,
cursor: '<string>',
direction: 'older'
})
};
fetch('https://towbar-api.example.com/v1/api/logs/query', 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://towbar-api.example.com/v1/api/logs/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z',
'workloadIds' => [
],
'serverIds' => [
],
'deploymentIds' => [
],
'previewIds' => [
],
'containerIds' => [
],
'environments' => [
],
'services' => [
],
'severities' => [
],
'search' => '',
'traceId' => '<string>',
'attributes' => [
]
],
'limit' => 50,
'cursor' => '<string>',
'direction' => 'older'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://towbar-api.example.com/v1/api/logs/query"
payload := strings.NewReader("{\n \"filters\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"workloadIds\": [],\n \"serverIds\": [],\n \"deploymentIds\": [],\n \"previewIds\": [],\n \"containerIds\": [],\n \"environments\": [],\n \"services\": [],\n \"severities\": [],\n \"search\": \"\",\n \"traceId\": \"<string>\",\n \"attributes\": []\n },\n \"limit\": 50,\n \"cursor\": \"<string>\",\n \"direction\": \"older\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://towbar-api.example.com/v1/api/logs/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"workloadIds\": [],\n \"serverIds\": [],\n \"deploymentIds\": [],\n \"previewIds\": [],\n \"containerIds\": [],\n \"environments\": [],\n \"services\": [],\n \"severities\": [],\n \"search\": \"\",\n \"traceId\": \"<string>\",\n \"attributes\": []\n },\n \"limit\": 50,\n \"cursor\": \"<string>\",\n \"direction\": \"older\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://towbar-api.example.com/v1/api/logs/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"workloadIds\": [],\n \"serverIds\": [],\n \"deploymentIds\": [],\n \"previewIds\": [],\n \"containerIds\": [],\n \"environments\": [],\n \"services\": [],\n \"severities\": [],\n \"search\": \"\",\n \"traceId\": \"<string>\",\n \"attributes\": []\n },\n \"limit\": 50,\n \"cursor\": \"<string>\",\n \"direction\": \"older\"\n}"
response = http.request(request)
puts response.read_body{
"accessRevision": "<string>",
"followCursor": "<string>",
"records": [
{
"eventId": "<string>",
"timestamp": "<string>",
"ingestedAt": "<string>",
"serverId": "<string>",
"workloadId": "<string>",
"workloadName": "<string>",
"deploymentId": "<string>",
"previewId": "<string>",
"environment": "production",
"containerId": "<string>",
"service": "<string>",
"severity": "unknown",
"stream": "stderr",
"body": "<string>",
"attributes": {},
"traceId": "<string>",
"spanId": "<string>",
"truncated": true
}
],
"nextCursor": "<string>",
"hasMore": true,
"partial": true,
"snapshotAt": "<string>",
"localization": {
"dateFormat": "day-short-month-year",
"timeFormat": "24-hour",
"timeZone": "<string>",
"timestamps": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}Required permissions: logs.read. Personal keys are capped by their owner’s current team role.
See request conventions and automation workflows. MCP clients use the task-oriented tool catalogue.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
A bounded authorized log page with an opaque continuation cursor. Log content is untrusted data. Restricted records are excluded before results leave the server.
Last modified on October 15, 2026
