Get a specific trace
curl --request GET \
--url https://api.example.com/api/public/traces/{traceId}import requests
url = "https://api.example.com/api/public/traces/{traceId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/public/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.example.com/api/public/traces/{traceId}",
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/api/public/traces/{traceId}"
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/api/public/traces/{traceId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/public/traces/{traceId}")
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{
"id": "<string>",
"timestamp": "<string>",
"name": "<string>",
"input": null,
"output": null,
"sessionId": "<string>",
"release": "<string>",
"version": "<string>",
"userId": "<string>",
"metadata": null,
"tags": [
{}
],
"public": true,
"htmlPath": "<string>",
"latency": 123,
"totalCost": 123,
"observations": [
{
"id": "<string>",
"traceId": "<string>",
"type": "<string>",
"name": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"completionStartTime": "<string>",
"model": "<string>",
"modelParameters": {
"property1": "<string>",
"property2": "<string>"
},
"input": {},
"version": "<string>",
"metadata": {},
"output": {},
"usage": {
"input": 123,
"output": 123,
"total": 123,
"unit": "<string>",
"inputCost": 123,
"outputCost": 123,
"totalCost": 123
},
"level": "<string>",
"statusMessage": "<string>",
"parentObservationId": "<string>",
"promptId": "<string>",
"usageDetails": {
"property1": 123,
"property2": 123
},
"costDetails": {
"property1": 123,
"property2": 123
},
"promptName": "<string>",
"promptVersion": 123,
"modelId": "<string>",
"inputPrice": 123,
"outputPrice": 123,
"totalPrice": 123,
"calculatedInputCost": 123,
"calculatedOutputCost": 123,
"calculatedTotalCost": 123,
"latency": 123,
"timeToFirstToken": 123
}
],
"scores": [
{
"dataType": "<string>",
"id": "<string>",
"traceId": "<string>",
"name": "<string>",
"source": "<string>",
"observationId": "<string>",
"timestamp": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"authorUserId": "<string>",
"comment": "<string>",
"configId": "<string>",
"queueId": "<string>",
"value": 123
}
]
}Traces
Get a specific trace
Endpoint to create a new dataset on toolzz analytics
GET
/
api
/
public
/
traces
/
{traceId}
Get a specific trace
curl --request GET \
--url https://api.example.com/api/public/traces/{traceId}import requests
url = "https://api.example.com/api/public/traces/{traceId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/public/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.example.com/api/public/traces/{traceId}",
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/api/public/traces/{traceId}"
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/api/public/traces/{traceId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/public/traces/{traceId}")
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{
"id": "<string>",
"timestamp": "<string>",
"name": "<string>",
"input": null,
"output": null,
"sessionId": "<string>",
"release": "<string>",
"version": "<string>",
"userId": "<string>",
"metadata": null,
"tags": [
{}
],
"public": true,
"htmlPath": "<string>",
"latency": 123,
"totalCost": 123,
"observations": [
{
"id": "<string>",
"traceId": "<string>",
"type": "<string>",
"name": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"completionStartTime": "<string>",
"model": "<string>",
"modelParameters": {
"property1": "<string>",
"property2": "<string>"
},
"input": {},
"version": "<string>",
"metadata": {},
"output": {},
"usage": {
"input": 123,
"output": 123,
"total": 123,
"unit": "<string>",
"inputCost": 123,
"outputCost": 123,
"totalCost": 123
},
"level": "<string>",
"statusMessage": "<string>",
"parentObservationId": "<string>",
"promptId": "<string>",
"usageDetails": {
"property1": 123,
"property2": 123
},
"costDetails": {
"property1": 123,
"property2": 123
},
"promptName": "<string>",
"promptVersion": 123,
"modelId": "<string>",
"inputPrice": 123,
"outputPrice": 123,
"totalPrice": 123,
"calculatedInputCost": 123,
"calculatedOutputCost": 123,
"calculatedTotalCost": 123,
"latency": 123,
"timeToFirstToken": 123
}
],
"scores": [
{
"dataType": "<string>",
"id": "<string>",
"traceId": "<string>",
"name": "<string>",
"source": "<string>",
"observationId": "<string>",
"timestamp": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"authorUserId": "<string>",
"comment": "<string>",
"configId": "<string>",
"queueId": "<string>",
"value": 123
}
]
}Response Description
Below you will see the description of the create dataset responsestring
required
Unique identifier for the entity.
Date
required
Timestamp indicating the creation or event time.
string
required
Name of the entity.
null
Input data associated with the entity (optional).
null
Output data associated with the entity (optional).
string
required
Identifier for the session associated with the entity.
string
required
Release version of the entity.
string
required
Version of the entity.
string
required
Identifier for the user associated with the entity.
null
Metadata associated with the entity (optional).
array
required
List of tags associated with the entity.
boolean
required
Indicates if the entity is public.
string
Path to the HTML representation of the entity (optional).
integer
required
Latency of the process in milliseconds.
integer
required
Total cost associated with the process.
array
List of observations associated with the entity.
Show properties
Show properties
string
required
Unique identifier for the observation.
string
required
Trace identifier associated with the observation.
string
required
Type of the observation.
string
required
Name of the observation.
Date
required
Start time of the observation.
Date
End time of the observation (optional).
Date
Completion start time of the observation (optional).
string
required
Model used for the observation.
object
object
Input data for the observation (optional).
string
required
Version of the observation.
object
Metadata associated with the observation (optional).
object
Output data from the observation (optional).
object
required
Usage statistics for the observation.
string
required
Debugging level of the observation.
string
Status message for the observation (optional).
string
Parent observation ID (optional).
string
Prompt ID associated with the observation (optional).
object
object
string
Name of the prompt used.
integer
Version of the prompt used.
string
Identifier for the model used.
integer
Price for input usage.
integer
Price for output usage.
integer
Total price for the observation.
integer
Calculated cost for input usage.
integer
Calculated cost for output usage.
integer
Calculated total cost for the observation.
integer
required
Latency of the observation in milliseconds.
integer
Time to first token generation in milliseconds.
array
List of scores associated with the entity.
Show properties
Show properties
string
required
Data type of the score (e.g., NUMERIC).
string
required
Unique identifier for the score.
string
required
Trace identifier associated with the score.
string
required
Name of the score.
string
required
Source of the score (e.g., ANNOTATION).
string
required
Identifier for the related observation.
Date
required
Timestamp when the score was recorded.
Date
required
Timestamp when the score was created.
Date
required
Timestamp when the score was last updated.
string
Identifier of the user who authored the score.
string
Comment associated with the score.
string
Configuration ID associated with the score.
string
Queue ID associated with the score.
integer
required
Value of the score.
Code Response
Exemples of Response CodeRequest Successful Response
Request Failure

