Summarize centralized logs
curl --request POST \
--url https://towbar-api.example.com/v1/api/logs/summary \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"workloadIds": [],
"serverIds": [],
"deploymentIds": [],
"previewIds": [],
"containerIds": [],
"environments": [],
"services": [],
"severities": [],
"search": "",
"traceId": "<string>",
"attributes": []
}
'import requests
url = "https://towbar-api.example.com/v1/api/logs/summary"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"workloadIds": [],
"serverIds": [],
"deploymentIds": [],
"previewIds": [],
"containerIds": [],
"environments": [],
"services": [],
"severities": [],
"search": "",
"traceId": "<string>",
"attributes": []
}
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({
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
workloadIds: [],
serverIds: [],
deploymentIds: [],
previewIds: [],
containerIds: [],
environments: [],
services: [],
severities: [],
search: '',
traceId: '<string>',
attributes: []
})
};
fetch('https://towbar-api.example.com/v1/api/logs/summary', 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/summary",
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([
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z',
'workloadIds' => [
],
'serverIds' => [
],
'deploymentIds' => [
],
'previewIds' => [
],
'containerIds' => [
],
'environments' => [
],
'services' => [
],
'severities' => [
],
'search' => '',
'traceId' => '<string>',
'attributes' => [
]
]),
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/summary"
payload := strings.NewReader("{\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}")
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/summary")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://towbar-api.example.com/v1/api/logs/summary")
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 \"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}"
response = http.request(request)
puts response.read_body{
"attributeKeys": [
"<string>"
],
"facets": {},
"buckets": [
{
"at": "<string>",
"severity": "<string>",
"count": 123
}
],
"partial": true,
"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>"
}
}Summarize centralized logs
Summarize centralized logs through the Towbar REST API.
POST
/
logs
/
summary
Summarize centralized logs
curl --request POST \
--url https://towbar-api.example.com/v1/api/logs/summary \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"workloadIds": [],
"serverIds": [],
"deploymentIds": [],
"previewIds": [],
"containerIds": [],
"environments": [],
"services": [],
"severities": [],
"search": "",
"traceId": "<string>",
"attributes": []
}
'import requests
url = "https://towbar-api.example.com/v1/api/logs/summary"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"workloadIds": [],
"serverIds": [],
"deploymentIds": [],
"previewIds": [],
"containerIds": [],
"environments": [],
"services": [],
"severities": [],
"search": "",
"traceId": "<string>",
"attributes": []
}
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({
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
workloadIds: [],
serverIds: [],
deploymentIds: [],
previewIds: [],
containerIds: [],
environments: [],
services: [],
severities: [],
search: '',
traceId: '<string>',
attributes: []
})
};
fetch('https://towbar-api.example.com/v1/api/logs/summary', 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/summary",
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([
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z',
'workloadIds' => [
],
'serverIds' => [
],
'deploymentIds' => [
],
'previewIds' => [
],
'containerIds' => [
],
'environments' => [
],
'services' => [
],
'severities' => [
],
'search' => '',
'traceId' => '<string>',
'attributes' => [
]
]),
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/summary"
payload := strings.NewReader("{\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}")
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/summary")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://towbar-api.example.com/v1/api/logs/summary")
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 \"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}"
response = http.request(request)
puts response.read_body{
"attributeKeys": [
"<string>"
],
"facets": {},
"buckets": [
{
"at": "<string>",
"severity": "<string>",
"count": 123
}
],
"partial": true,
"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
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Maximum array length:
50Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Maximum array length:
50Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Maximum array length:
50Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Maximum array length:
50Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Maximum array length:
50Pattern:
^[a-f0-9]{64}$Maximum array length:
2Available options:
production, preview Maximum array length:
50Required string length:
1 - 128Maximum array length:
7Available options:
trace, debug, info, warn, error, fatal, unknown Available options:
stdout, stderr Maximum string length:
512Pattern:
^[a-f0-9]{32}$Show child attributes
Show child attributes
Maximum array length:
8Show child attributes
Show child attributes
Last modified on October 15, 2026
