List Benchmark Versions By Name
curl --request GET \
--url https://api.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions', 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.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions",
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-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.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"bench_id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"description": "",
"visibility": "private",
"eval_run_count": 0
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_cursor",
"message": "<string>",
"doc_url": "<string>",
"context": {},
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "<string>",
"doc_url": "<string>",
"context": {},
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"context": {},
"param": "<string>"
}
}Agents
List Benchmark Versions By Name
Page benchmark snapshots by creation time and benchmark ID, both descending. Cursors are opaque and bound to the organization, agent, and name. Traversal is not a snapshot; use next_cursor while has_more is true. An existing agent with no matching snapshots returns an empty page.
GET
/
api
/
v1
/
agents
/
{agent_id}
/
benchmarks
/
versions
List Benchmark Versions By Name
curl --request GET \
--url https://api.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions', 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.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions",
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-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.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trajectory.ai/api/v1/agents/{agent_id}/benchmarks/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"bench_id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"description": "",
"visibility": "private",
"eval_run_count": 0
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_cursor",
"message": "<string>",
"doc_url": "<string>",
"context": {},
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "<string>",
"doc_url": "<string>",
"context": {},
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"context": {},
"param": "<string>"
}
}Authorizations
Organization API key
Path Parameters
Minimum string length:
1Query Parameters
Minimum string length:
1Required range:
1 <= x <= 200