Get a trace
curl --request GET \
--url https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId} \
--cookie session=import requests
url = "https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}"
headers = {"cookie": "session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'session='}};
fetch('https://pillarforge.corepillar.ai/api/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://pillarforge.corepillar.ai/api/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_COOKIE => "session=",
]);
$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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}")
.header("cookie", "session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'session='
response = http.request(request)
puts response.read_body{
"data": {
"trace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trace_id": "<string>",
"root_name": "<string>",
"status": "OK",
"environment": "<string>",
"source": "live",
"duration_ms": 123,
"llm_time_ms": 123,
"http_time_ms": 123,
"span_count": 123,
"llm_call_count": 123,
"tool_call_count": 123,
"tokens_in": 123,
"tokens_out": 123,
"cost_usd": 123,
"started_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"spans": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trace_id": "<string>",
"span_id": "<string>",
"parent_span_id": "<string>",
"name": "<string>",
"kind": "llm",
"model": "<string>",
"status": "OK",
"tokens_in": 123,
"tokens_out": 123,
"cost_usd": 123,
"latency_ms": 123,
"input": {},
"output": {},
"attributes": {},
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}Get a trace
One trace with all of its spans, ordered by started_at.
Auth: session. Permission: member of the project’s organization.
GET
/
projects
/
{projectId}
/
traces
/
{traceId}
Get a trace
curl --request GET \
--url https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId} \
--cookie session=import requests
url = "https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}"
headers = {"cookie": "session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'session='}};
fetch('https://pillarforge.corepillar.ai/api/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://pillarforge.corepillar.ai/api/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_COOKIE => "session=",
]);
$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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}")
.header("cookie", "session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'session='
response = http.request(request)
puts response.read_body{
"data": {
"trace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trace_id": "<string>",
"root_name": "<string>",
"status": "OK",
"environment": "<string>",
"source": "live",
"duration_ms": 123,
"llm_time_ms": 123,
"http_time_ms": 123,
"span_count": 123,
"llm_call_count": 123,
"tool_call_count": 123,
"tokens_in": 123,
"tokens_out": 123,
"cost_usd": 123,
"started_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"spans": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trace_id": "<string>",
"span_id": "<string>",
"parent_span_id": "<string>",
"name": "<string>",
"kind": "llm",
"model": "<string>",
"status": "OK",
"tokens_in": 123,
"tokens_out": 123,
"cost_usd": 123,
"latency_ms": 123,
"input": {},
"output": {},
"attributes": {},
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}Authorizations
The session cookie set when you sign in to AgentHub or ModelHub in a browser. The cookie name shown here is illustrative. There are no API tokens for these endpoints.
Path Parameters
Project id.
Your trace_id, URL-encoded.
Response
The trace and its spans.
Show child attributes
Show child attributes