A trace
curl --request GET \
--url https://api.apsio.io/v1/projects/{projectId}/traces/{traceId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apsio.io/v1/projects/{projectId}/traces/{traceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apsio.io/v1/projects/{projectId}/traces/{traceId}', 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}/traces/{traceId}",
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://api.apsio.io/v1/projects/{projectId}/traces/{traceId}"
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://api.apsio.io/v1/projects/{projectId}/traces/{traceId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/projects/{projectId}/traces/{traceId}")
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{
"trace_id": "<string>",
"apm_url": "<string>",
"truncated": true,
"spans": [
{
"span_id": "<string>",
"parent_span_id": "<string>",
"name": "<string>",
"source": "device",
"service_name": "<string>",
"kind": "<string>",
"status": {
"code": "<string>",
"message": "<string>"
},
"app_id": "<string>",
"session_id": "<string>",
"start": "2026-10-04T10:15:00.431000000Z",
"end": "2026-10-04T10:15:00.431000000Z",
"duration_ms": 123,
"http": {
"method": "GET",
"host": "<string>",
"template": "<string>",
"status": 123
},
"attributes": {}
}
]
}{
"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
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}API reference
A trace
The spans of one trace (W3C trace id, D37) in the time range (default: the last 30 days, at most 30), oldest first, at most 500, with a link to the same trace in the APM. Device spans come from the Apsio SDKs; backend spans are those the team’s services send over OTLP with the same trace id (no session; they count toward the sessionless allowance, D110), each marked by source.
GET
/
projects
/
{projectId}
/
traces
/
{traceId}
A trace
curl --request GET \
--url https://api.apsio.io/v1/projects/{projectId}/traces/{traceId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apsio.io/v1/projects/{projectId}/traces/{traceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apsio.io/v1/projects/{projectId}/traces/{traceId}', 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}/traces/{traceId}",
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://api.apsio.io/v1/projects/{projectId}/traces/{traceId}"
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://api.apsio.io/v1/projects/{projectId}/traces/{traceId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/projects/{projectId}/traces/{traceId}")
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{
"trace_id": "<string>",
"apm_url": "<string>",
"truncated": true,
"spans": [
{
"span_id": "<string>",
"parent_span_id": "<string>",
"name": "<string>",
"source": "device",
"service_name": "<string>",
"kind": "<string>",
"status": {
"code": "<string>",
"message": "<string>"
},
"app_id": "<string>",
"session_id": "<string>",
"start": "2026-10-04T10:15:00.431000000Z",
"end": "2026-10-04T10:15:00.431000000Z",
"duration_ms": 123,
"http": {
"method": "GET",
"host": "<string>",
"template": "<string>",
"status": 123
},
"attributes": {}
}
]
}{
"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
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization",
"queries_per_minute": 123
}
}