Search the spans
curl --request POST \
--url https://api.apsio.io/v1/projects/{projectId}/explore/traces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"app_id": "<string>",
"filters": [],
"errors_only": false,
"min_duration_ms": 43200000,
"max_duration_ms": 43200000,
"root_only": false,
"sort": "recent",
"limit": 100,
"cursor": "<string>"
}
'import requests
url = "https://api.apsio.io/v1/projects/{projectId}/explore/traces"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"app_id": "<string>",
"filters": [],
"errors_only": False,
"min_duration_ms": 43200000,
"max_duration_ms": 43200000,
"root_only": False,
"sort": "recent",
"limit": 100,
"cursor": "<string>"
}
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',
app_id: '<string>',
filters: [],
errors_only: false,
min_duration_ms: 43200000,
max_duration_ms: 43200000,
root_only: false,
sort: 'recent',
limit: 100,
cursor: '<string>'
})
};
fetch('https://api.apsio.io/v1/projects/{projectId}/explore/traces', 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://api.apsio.io/v1/projects/{projectId}/explore/traces",
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',
'app_id' => '<string>',
'filters' => [
],
'errors_only' => false,
'min_duration_ms' => 43200000,
'max_duration_ms' => 43200000,
'root_only' => false,
'sort' => 'recent',
'limit' => 100,
'cursor' => '<string>'
]),
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://api.apsio.io/v1/projects/{projectId}/explore/traces"
payload := strings.NewReader("{\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"app_id\": \"<string>\",\n \"filters\": [],\n \"errors_only\": false,\n \"min_duration_ms\": 43200000,\n \"max_duration_ms\": 43200000,\n \"root_only\": false,\n \"sort\": \"recent\",\n \"limit\": 100,\n \"cursor\": \"<string>\"\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://api.apsio.io/v1/projects/{projectId}/explore/traces")
.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 \"app_id\": \"<string>\",\n \"filters\": [],\n \"errors_only\": false,\n \"min_duration_ms\": 43200000,\n \"max_duration_ms\": 43200000,\n \"root_only\": false,\n \"sort\": \"recent\",\n \"limit\": 100,\n \"cursor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/projects/{projectId}/explore/traces")
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 \"app_id\": \"<string>\",\n \"filters\": [],\n \"errors_only\": false,\n \"min_duration_ms\": 43200000,\n \"max_duration_ms\": 43200000,\n \"root_only\": false,\n \"sort\": \"recent\",\n \"limit\": 100,\n \"cursor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"from": "2026-10-04T10:15:00.431000000Z",
"to": "2026-10-04T10:15:00.431000000Z",
"bucket_seconds": 123,
"retention_days": 123,
"histogram": [
{
"t": "2026-10-04T10:15:00.431000000Z",
"spans": 123,
"failed": 123,
"p50_ms": 123,
"p95_ms": 123
}
],
"spans": [
{
"trace_id": "<string>",
"span_id": "<string>",
"parent_span_id": "<string>",
"app_id": "<string>",
"name": "<string>",
"start": "2026-10-04T10:15:00.431000000Z",
"duration_ms": 123,
"failed": true,
"kind": "<string>",
"status_code": "<string>",
"status_message": "<string>",
"http_status": 123,
"session_id": "<string>",
"release": "<string>",
"attributes": {}
}
],
"next_cursor": "<string>",
"sql": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}API reference
Search the spans
The project’s spans matching a structured query (fields such as span.kind and span.status_code, attributes, failures, duration), newest or slowest first, 100 a page, and per bucket their count, failures and median and 95th percentile durations (at most 120 buckets). Each span’s trace_id opens it in GET /projects//traces/. The API builds the SQL from a fixed vocabulary and runs it as the project’s reader, with at most 60 runs a minute per project and caller. sql shows it with its values, for reading only.
POST
/
projects
/
{projectId}
/
explore
/
traces
Search the spans
curl --request POST \
--url https://api.apsio.io/v1/projects/{projectId}/explore/traces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"app_id": "<string>",
"filters": [],
"errors_only": false,
"min_duration_ms": 43200000,
"max_duration_ms": 43200000,
"root_only": false,
"sort": "recent",
"limit": 100,
"cursor": "<string>"
}
'import requests
url = "https://api.apsio.io/v1/projects/{projectId}/explore/traces"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"app_id": "<string>",
"filters": [],
"errors_only": False,
"min_duration_ms": 43200000,
"max_duration_ms": 43200000,
"root_only": False,
"sort": "recent",
"limit": 100,
"cursor": "<string>"
}
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',
app_id: '<string>',
filters: [],
errors_only: false,
min_duration_ms: 43200000,
max_duration_ms: 43200000,
root_only: false,
sort: 'recent',
limit: 100,
cursor: '<string>'
})
};
fetch('https://api.apsio.io/v1/projects/{projectId}/explore/traces', 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://api.apsio.io/v1/projects/{projectId}/explore/traces",
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',
'app_id' => '<string>',
'filters' => [
],
'errors_only' => false,
'min_duration_ms' => 43200000,
'max_duration_ms' => 43200000,
'root_only' => false,
'sort' => 'recent',
'limit' => 100,
'cursor' => '<string>'
]),
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://api.apsio.io/v1/projects/{projectId}/explore/traces"
payload := strings.NewReader("{\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"app_id\": \"<string>\",\n \"filters\": [],\n \"errors_only\": false,\n \"min_duration_ms\": 43200000,\n \"max_duration_ms\": 43200000,\n \"root_only\": false,\n \"sort\": \"recent\",\n \"limit\": 100,\n \"cursor\": \"<string>\"\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://api.apsio.io/v1/projects/{projectId}/explore/traces")
.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 \"app_id\": \"<string>\",\n \"filters\": [],\n \"errors_only\": false,\n \"min_duration_ms\": 43200000,\n \"max_duration_ms\": 43200000,\n \"root_only\": false,\n \"sort\": \"recent\",\n \"limit\": 100,\n \"cursor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/projects/{projectId}/explore/traces")
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 \"app_id\": \"<string>\",\n \"filters\": [],\n \"errors_only\": false,\n \"min_duration_ms\": 43200000,\n \"max_duration_ms\": 43200000,\n \"root_only\": false,\n \"sort\": \"recent\",\n \"limit\": 100,\n \"cursor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"from": "2026-10-04T10:15:00.431000000Z",
"to": "2026-10-04T10:15:00.431000000Z",
"bucket_seconds": 123,
"retention_days": 123,
"histogram": [
{
"t": "2026-10-04T10:15:00.431000000Z",
"spans": 123,
"failed": 123,
"p50_ms": 123,
"p95_ms": 123
}
],
"spans": [
{
"trace_id": "<string>",
"span_id": "<string>",
"parent_span_id": "<string>",
"app_id": "<string>",
"name": "<string>",
"start": "2026-10-04T10:15:00.431000000Z",
"duration_ms": 123,
"failed": true,
"kind": "<string>",
"status_code": "<string>",
"status_message": "<string>",
"http_status": 123,
"session_id": "<string>",
"release": "<string>",
"attributes": {}
}
],
"next_cursor": "<string>",
"sql": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}Authorizations
Path Parameters
Body
application/json
Response
The matching spans and their volume.