curl --request GET \
--url https://api.example.com/v1/projects/{project_identifier}/tracesimport requests
url = "https://api.example.com/v1/projects/{project_identifier}/traces"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/projects/{project_identifier}/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.example.com/v1/projects/{project_identifier}/traces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/projects/{project_identifier}/traces"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/projects/{project_identifier}/traces")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_identifier}/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"trace_id": "<string>",
"project_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"token_count_prompt": 0,
"token_count_completion": 0,
"token_count_total": 0,
"spans": [
{
"id": "<string>",
"span_id": "<string>",
"parent_id": "<string>",
"name": "<string>",
"span_kind": "<string>",
"status_code": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z"
}
]
}
],
"next_cursor": "<string>"
}"<string>""<string>""<string>""<string>"List traces for a project
curl --request GET \
--url https://api.example.com/v1/projects/{project_identifier}/tracesimport requests
url = "https://api.example.com/v1/projects/{project_identifier}/traces"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/projects/{project_identifier}/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.example.com/v1/projects/{project_identifier}/traces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/projects/{project_identifier}/traces"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/projects/{project_identifier}/traces")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_identifier}/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"trace_id": "<string>",
"project_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"token_count_prompt": 0,
"token_count_completion": 0,
"token_count_total": 0,
"spans": [
{
"id": "<string>",
"span_id": "<string>",
"parent_id": "<string>",
"name": "<string>",
"span_kind": "<string>",
"status_code": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z"
}
]
}
],
"next_cursor": "<string>"
}"<string>""<string>""<string>""<string>"Path Parameters
The project identifier: either project ID or project name.
Query Parameters
Inclusive lower bound on trace start time (ISO 8601)
Exclusive upper bound on trace start time (ISO 8601)
Sort field
start_time, latency_ms Sort direction
asc, desc Maximum number of traces to return
x <= 1000Pagination cursor returned by a previous request
If true, include full span details for each trace. This significantly increases response size and query latency, especially with large page sizes. Prefer fetching spans lazily for individual traces when possible.
List of session identifiers to filter traces by. Each value can be either a session_id string or a session GlobalID. Only traces belonging to the specified sessions will be returned.
Deprecated: use filter=error_count > 0 or filter=error_count == 0. Filter by trace error status. If true, only return traces that contain at least one span with status_code == ERROR. If false, only return traces with no errored spans. If omitted, traces are not filtered by error status.
Inclusive lower bound on trace latency in milliseconds. Deprecated: use filter=latency_ms >= N.
x >= 0Inclusive upper bound on trace latency in milliseconds. Deprecated: use filter=latency_ms <= N.
x >= 0Trace filter expression, as documented at https://arize.com/docs/phoenix/tracing/how-to-tracing/filter-expressions. Combined with other filters using AND. Empty expressions do not filter. Invalid expressions return 400.
Was this page helpful?

