Get trace by ID
curl --request GET \
--url https://api.getmaxim.ai/v1/log-repositories/logs/traces \
--header 'x-maxim-api-key: <api-key>'import requests
url = "https://api.getmaxim.ai/v1/log-repositories/logs/traces"
headers = {"x-maxim-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-maxim-api-key': '<api-key>'}};
fetch('https://api.getmaxim.ai/v1/log-repositories/logs/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.getmaxim.ai/v1/log-repositories/logs/traces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-maxim-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"
"net/http"
"io"
)
func main() {
url := "https://api.getmaxim.ai/v1/log-repositories/logs/traces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-maxim-api-key", "<api-key>")
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.getmaxim.ai/v1/log-repositories/logs/traces")
.header("x-maxim-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmaxim.ai/v1/log-repositories/logs/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-maxim-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"tags": {},
"startTimestamp": "<string>",
"sessionId": "<string>",
"type": "<string>",
"feedback": {
"score": 123,
"comment": "<string>"
},
"duration": 123,
"endTimestamp": "<string>",
"version": 123,
"timeline": [
{
"traceId": "<string>",
"name": "<string>",
"id": "<string>",
"type": "<string>",
"startTimestamp": "<string>",
"tags": {},
"timeline": [
{
"spanId": "<string>",
"name": "<string>",
"id": "<string>",
"type": "<string>",
"modelParameters": {
"presencePenalty": 123,
"maxTokens": 123,
"temperature": 123,
"frequencyPenalty": 123,
"topP": 123
},
"provider": "<string>",
"messages": [
{
"role": "<string>",
"content": "<string>"
}
],
"model": "<string>",
"startTimestamp": "<string>",
"completionResult": {
"cost": {
"output": 123,
"input": 123,
"total": 123
},
"provider": "<string>",
"created": null,
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
},
"model": "<string>",
"model_params": null,
"id": "<string>",
"choices": [
{
"message": {
"role": "<string>",
"content": "<string>",
"function_call": null,
"tool_calls": null
},
"finish_reason": "<string>",
"logprobs": null,
"index": 123
}
],
"error": null
},
"duration": 123,
"endTimestamp": "<string>",
"timestamp": "<string>",
"tags": {},
"input": "<string>",
"docs": [
"<string>"
]
}
]
}
],
"evaluationData": [
{
"evaluatorName": "<string>",
"score": 123,
"pass": true,
"reasoning": "<string>",
"variables": {},
"optionalVariables": {}
}
],
"input": null,
"output": null
}
}Log repository
Get trace by ID
Get a specific trace by ID
GET
/
v1
/
log-repositories
/
logs
/
traces
Get trace by ID
curl --request GET \
--url https://api.getmaxim.ai/v1/log-repositories/logs/traces \
--header 'x-maxim-api-key: <api-key>'import requests
url = "https://api.getmaxim.ai/v1/log-repositories/logs/traces"
headers = {"x-maxim-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-maxim-api-key': '<api-key>'}};
fetch('https://api.getmaxim.ai/v1/log-repositories/logs/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.getmaxim.ai/v1/log-repositories/logs/traces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-maxim-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"
"net/http"
"io"
)
func main() {
url := "https://api.getmaxim.ai/v1/log-repositories/logs/traces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-maxim-api-key", "<api-key>")
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.getmaxim.ai/v1/log-repositories/logs/traces")
.header("x-maxim-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmaxim.ai/v1/log-repositories/logs/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-maxim-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"tags": {},
"startTimestamp": "<string>",
"sessionId": "<string>",
"type": "<string>",
"feedback": {
"score": 123,
"comment": "<string>"
},
"duration": 123,
"endTimestamp": "<string>",
"version": 123,
"timeline": [
{
"traceId": "<string>",
"name": "<string>",
"id": "<string>",
"type": "<string>",
"startTimestamp": "<string>",
"tags": {},
"timeline": [
{
"spanId": "<string>",
"name": "<string>",
"id": "<string>",
"type": "<string>",
"modelParameters": {
"presencePenalty": 123,
"maxTokens": 123,
"temperature": 123,
"frequencyPenalty": 123,
"topP": 123
},
"provider": "<string>",
"messages": [
{
"role": "<string>",
"content": "<string>"
}
],
"model": "<string>",
"startTimestamp": "<string>",
"completionResult": {
"cost": {
"output": 123,
"input": 123,
"total": 123
},
"provider": "<string>",
"created": null,
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
},
"model": "<string>",
"model_params": null,
"id": "<string>",
"choices": [
{
"message": {
"role": "<string>",
"content": "<string>",
"function_call": null,
"tool_calls": null
},
"finish_reason": "<string>",
"logprobs": null,
"index": 123
}
],
"error": null
},
"duration": 123,
"endTimestamp": "<string>",
"timestamp": "<string>",
"tags": {},
"input": "<string>",
"docs": [
"<string>"
]
}
]
}
],
"evaluationData": [
{
"evaluatorName": "<string>",
"score": 123,
"pass": true,
"reasoning": "<string>",
"variables": {},
"optionalVariables": {}
}
],
"input": null,
"output": null
}
}Was this page helpful?
⌘I