Get a list of observations
curl --request GET \
--url https://api.example.com/api/public/observationsimport requests
url = "https://api.example.com/api/public/observations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/public/observations', 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/observations",
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/observations"
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/observations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/public/observations")
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>",
"traceId": "<string>",
"type": "<string>",
"name": "<string>",
"startTime": {},
"endTime": {},
"completionStartTime": {},
"model": "<string>",
"modelParameters": {
"property1": "<string>",
"property2": "<string>"
},
"input": null,
"version": "<string>",
"metadata": null,
"output": null,
"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
}
],
"meta": {
"page": 123,
"limit": 123,
"totalItems": 123,
"totalPages": 123
}
}Observations
Get a list of observations
Endpoint to Get a list of observations on toolzz analytics
GET
/
api
/
public
/
observations
Get a list of observations
curl --request GET \
--url https://api.example.com/api/public/observationsimport requests
url = "https://api.example.com/api/public/observations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/public/observations', 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/observations",
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/observations"
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/observations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/public/observations")
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>",
"traceId": "<string>",
"type": "<string>",
"name": "<string>",
"startTime": {},
"endTime": {},
"completionStartTime": {},
"model": "<string>",
"modelParameters": {
"property1": "<string>",
"property2": "<string>"
},
"input": null,
"version": "<string>",
"metadata": null,
"output": null,
"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
}
],
"meta": {
"page": 123,
"limit": 123,
"totalItems": 123,
"totalPages": 123
}
}Show Request
Show Request
integer
Page number, starts at 1 (nullable).
integer
Limit of items per page. Reduce the size if API issues occur (nullable).
string
Optional filter for a specific name (nullable).
string
Optional filter for a specific user ID (nullable).
string
Optional filter for a specific type (nullable).
string
Optional filter for a specific trace ID (nullable).
string
Optional filter for a specific parent observation ID (nullable).
date-time
required
Retrieve only observations with a
start_time on or after this datetime (ISO 8601).date-time
required
Retrieve only observations with a
start_time before this datetime (ISO 8601).string
Optional filter to include only observations with a certain version (nullable).
Response Description
Below you will see the description of the Get a list of observations responsearray
required
List of observation data.
Show properties
Show properties
string
required
Unique identifier of the observation.
string
required
Identifier of the trace associated with the observation.
string
required
Type of the observation.
string
required
Name of the observation.
date-time
required
Start time of the observation.
date-time
required
End time of the observation.
date-time
Time when the completion started.
string
required
Model used in the observation.
object
required
null
Input data for the observation (nullable).
string
Version of the observation.
null
Metadata associated with the observation (nullable).
null
Output data from the observation (nullable).
object
required
Usage metrics.
string
required
Log level of the observation (e.g., DEBUG).
string
Status message of the observation.
string
Parent observation ID, if applicable.
string
Prompt ID used in the observation.
object
object
string
Name of the prompt used.
integer
Version of the prompt used.
string
Identifier of the model used.
integer
Price for input usage.
integer
Price for output usage.
integer
Total price for the observation.
integer
Calculated cost for input.
integer
Calculated cost for output.
integer
Calculated total cost.
integer
Latency of the observation.
integer
Time taken to generate the first token.
object
required
Code Response
Exemples of Response CodeRequest Successful Response
Request Failure

