Search trace-bearing calls
curl --request POST \
--url https://api.coval.dev/v1/traces/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"cursor": "<string>",
"limit": 25,
"filters": {
"start_date": "2026-07-30T00:00:00Z",
"end_date": "2026-07-31T00:00:00Z",
"span_name": "<string>",
"provider": "<string>",
"attribute_filters": [
{
"key": "<string>",
"operator": "contains",
"value": "<string>"
}
],
"duration_ms_min": 1,
"duration_ms_max": 1,
"sort_by": "newest",
"agent_id": "<string>",
"test_set_id": "<string>"
}
}
'import requests
url = "https://api.coval.dev/v1/traces/search"
payload = {
"cursor": "<string>",
"limit": 25,
"filters": {
"start_date": "2026-07-30T00:00:00Z",
"end_date": "2026-07-31T00:00:00Z",
"span_name": "<string>",
"provider": "<string>",
"attribute_filters": [
{
"key": "<string>",
"operator": "contains",
"value": "<string>"
}
],
"duration_ms_min": 1,
"duration_ms_max": 1,
"sort_by": "newest",
"agent_id": "<string>",
"test_set_id": "<string>"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cursor: '<string>',
limit: 25,
filters: {
start_date: '2026-07-30T00:00:00Z',
end_date: '2026-07-31T00:00:00Z',
span_name: '<string>',
provider: '<string>',
attribute_filters: [{key: '<string>', operator: 'contains', value: '<string>'}],
duration_ms_min: 1,
duration_ms_max: 1,
sort_by: 'newest',
agent_id: '<string>',
test_set_id: '<string>'
}
})
};
fetch('https://api.coval.dev/v1/traces/search', 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.coval.dev/v1/traces/search",
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([
'cursor' => '<string>',
'limit' => 25,
'filters' => [
'start_date' => '2026-07-30T00:00:00Z',
'end_date' => '2026-07-31T00:00:00Z',
'span_name' => '<string>',
'provider' => '<string>',
'attribute_filters' => [
[
'key' => '<string>',
'operator' => 'contains',
'value' => '<string>'
]
],
'duration_ms_min' => 1,
'duration_ms_max' => 1,
'sort_by' => 'newest',
'agent_id' => '<string>',
'test_set_id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.coval.dev/v1/traces/search"
payload := strings.NewReader("{\n \"cursor\": \"<string>\",\n \"limit\": 25,\n \"filters\": {\n \"start_date\": \"2026-07-30T00:00:00Z\",\n \"end_date\": \"2026-07-31T00:00:00Z\",\n \"span_name\": \"<string>\",\n \"provider\": \"<string>\",\n \"attribute_filters\": [\n {\n \"key\": \"<string>\",\n \"operator\": \"contains\",\n \"value\": \"<string>\"\n }\n ],\n \"duration_ms_min\": 1,\n \"duration_ms_max\": 1,\n \"sort_by\": \"newest\",\n \"agent_id\": \"<string>\",\n \"test_set_id\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.coval.dev/v1/traces/search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cursor\": \"<string>\",\n \"limit\": 25,\n \"filters\": {\n \"start_date\": \"2026-07-30T00:00:00Z\",\n \"end_date\": \"2026-07-31T00:00:00Z\",\n \"span_name\": \"<string>\",\n \"provider\": \"<string>\",\n \"attribute_filters\": [\n {\n \"key\": \"<string>\",\n \"operator\": \"contains\",\n \"value\": \"<string>\"\n }\n ],\n \"duration_ms_min\": 1,\n \"duration_ms_max\": 1,\n \"sort_by\": \"newest\",\n \"agent_id\": \"<string>\",\n \"test_set_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/traces/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cursor\": \"<string>\",\n \"limit\": 25,\n \"filters\": {\n \"start_date\": \"2026-07-30T00:00:00Z\",\n \"end_date\": \"2026-07-31T00:00:00Z\",\n \"span_name\": \"<string>\",\n \"provider\": \"<string>\",\n \"attribute_filters\": [\n {\n \"key\": \"<string>\",\n \"operator\": \"contains\",\n \"value\": \"<string>\"\n }\n ],\n \"duration_ms_min\": 1,\n \"duration_ms_max\": 1,\n \"sort_by\": \"newest\",\n \"agent_id\": \"<string>\",\n \"test_set_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"simulation_output_id": "<string>",
"run_id": "<string>",
"latest_matched_timestamp_ms": 123,
"first_matched_timestamp_ms": 123,
"matched_span_count": 1,
"total_span_count": 1,
"error_span_count": 1,
"ok_span_count": 1,
"unset_span_count": 1,
"matched_span_names": [
"<string>"
],
"matched_provider_names": [
"<string>"
],
"matched_service_names": [
"<string>"
],
"matched_scope_names": [
"<string>"
]
}
],
"total_count": 1,
"aggregate_stats": {
"error_count": 1,
"error_rate": 50
},
"next_cursor": "<string>"
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "X-Simulation-Id",
"description": "No simulation output found with this ID"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "X-Simulation-Id",
"description": "No simulation output found with this ID"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred while processing the request"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "X-Simulation-Id",
"description": "No simulation output found with this ID"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "X-Simulation-Id",
"description": "No simulation output found with this ID"
}
]
}
}Traces
Search trace-bearing calls
Searches calls with ingested traces across the authenticated organization. Filters match spans, while each result represents one simulation output or monitoring conversation. Results include matched span facets and aggregate status counts, but not raw attribute values.
Pagination is cursor-based. Pass next_cursor from one response as cursor
in the next request while keeping the filters and sort order unchanged.
POST
/
traces
/
search
Search trace-bearing calls
curl --request POST \
--url https://api.coval.dev/v1/traces/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"cursor": "<string>",
"limit": 25,
"filters": {
"start_date": "2026-07-30T00:00:00Z",
"end_date": "2026-07-31T00:00:00Z",
"span_name": "<string>",
"provider": "<string>",
"attribute_filters": [
{
"key": "<string>",
"operator": "contains",
"value": "<string>"
}
],
"duration_ms_min": 1,
"duration_ms_max": 1,
"sort_by": "newest",
"agent_id": "<string>",
"test_set_id": "<string>"
}
}
'import requests
url = "https://api.coval.dev/v1/traces/search"
payload = {
"cursor": "<string>",
"limit": 25,
"filters": {
"start_date": "2026-07-30T00:00:00Z",
"end_date": "2026-07-31T00:00:00Z",
"span_name": "<string>",
"provider": "<string>",
"attribute_filters": [
{
"key": "<string>",
"operator": "contains",
"value": "<string>"
}
],
"duration_ms_min": 1,
"duration_ms_max": 1,
"sort_by": "newest",
"agent_id": "<string>",
"test_set_id": "<string>"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cursor: '<string>',
limit: 25,
filters: {
start_date: '2026-07-30T00:00:00Z',
end_date: '2026-07-31T00:00:00Z',
span_name: '<string>',
provider: '<string>',
attribute_filters: [{key: '<string>', operator: 'contains', value: '<string>'}],
duration_ms_min: 1,
duration_ms_max: 1,
sort_by: 'newest',
agent_id: '<string>',
test_set_id: '<string>'
}
})
};
fetch('https://api.coval.dev/v1/traces/search', 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.coval.dev/v1/traces/search",
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([
'cursor' => '<string>',
'limit' => 25,
'filters' => [
'start_date' => '2026-07-30T00:00:00Z',
'end_date' => '2026-07-31T00:00:00Z',
'span_name' => '<string>',
'provider' => '<string>',
'attribute_filters' => [
[
'key' => '<string>',
'operator' => 'contains',
'value' => '<string>'
]
],
'duration_ms_min' => 1,
'duration_ms_max' => 1,
'sort_by' => 'newest',
'agent_id' => '<string>',
'test_set_id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.coval.dev/v1/traces/search"
payload := strings.NewReader("{\n \"cursor\": \"<string>\",\n \"limit\": 25,\n \"filters\": {\n \"start_date\": \"2026-07-30T00:00:00Z\",\n \"end_date\": \"2026-07-31T00:00:00Z\",\n \"span_name\": \"<string>\",\n \"provider\": \"<string>\",\n \"attribute_filters\": [\n {\n \"key\": \"<string>\",\n \"operator\": \"contains\",\n \"value\": \"<string>\"\n }\n ],\n \"duration_ms_min\": 1,\n \"duration_ms_max\": 1,\n \"sort_by\": \"newest\",\n \"agent_id\": \"<string>\",\n \"test_set_id\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.coval.dev/v1/traces/search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cursor\": \"<string>\",\n \"limit\": 25,\n \"filters\": {\n \"start_date\": \"2026-07-30T00:00:00Z\",\n \"end_date\": \"2026-07-31T00:00:00Z\",\n \"span_name\": \"<string>\",\n \"provider\": \"<string>\",\n \"attribute_filters\": [\n {\n \"key\": \"<string>\",\n \"operator\": \"contains\",\n \"value\": \"<string>\"\n }\n ],\n \"duration_ms_min\": 1,\n \"duration_ms_max\": 1,\n \"sort_by\": \"newest\",\n \"agent_id\": \"<string>\",\n \"test_set_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/traces/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cursor\": \"<string>\",\n \"limit\": 25,\n \"filters\": {\n \"start_date\": \"2026-07-30T00:00:00Z\",\n \"end_date\": \"2026-07-31T00:00:00Z\",\n \"span_name\": \"<string>\",\n \"provider\": \"<string>\",\n \"attribute_filters\": [\n {\n \"key\": \"<string>\",\n \"operator\": \"contains\",\n \"value\": \"<string>\"\n }\n ],\n \"duration_ms_min\": 1,\n \"duration_ms_max\": 1,\n \"sort_by\": \"newest\",\n \"agent_id\": \"<string>\",\n \"test_set_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"simulation_output_id": "<string>",
"run_id": "<string>",
"latest_matched_timestamp_ms": 123,
"first_matched_timestamp_ms": 123,
"matched_span_count": 1,
"total_span_count": 1,
"error_span_count": 1,
"ok_span_count": 1,
"unset_span_count": 1,
"matched_span_names": [
"<string>"
],
"matched_provider_names": [
"<string>"
],
"matched_service_names": [
"<string>"
],
"matched_scope_names": [
"<string>"
]
}
],
"total_count": 1,
"aggregate_stats": {
"error_count": 1,
"error_rate": 50
},
"next_cursor": "<string>"
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "X-Simulation-Id",
"description": "No simulation output found with this ID"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "X-Simulation-Id",
"description": "No simulation output found with this ID"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred while processing the request"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "X-Simulation-Id",
"description": "No simulation output found with this ID"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "X-Simulation-Id",
"description": "No simulation output found with this ID"
}
]
}
}Authorizations
Organization API key for authentication
Body
application/json
Search filters and cursor. An omitted or empty body searches all trace-bearing calls.
Was this page helpful?
⌘I