import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const benchmarkView = await client.benchmarks.retrieve('id');
console.log(benchmarkView.id);import os
from runloop_api_client import Runloop
client = Runloop(
bearer_token=os.environ.get("RUNLOOP_API_KEY"), # This is the default and can be omitted
)
benchmark_view = client.benchmarks.retrieve(
"id",
)
print(benchmark_view.id)curl --request GET \
--url https://api.runloop.ai/v1/benchmarks/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/benchmarks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.runloop.ai/v1/benchmarks/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.runloop.ai/v1/benchmarks/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runloop.ai/v1/benchmarks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"scenarioIds": [
"<string>"
],
"metadata": {},
"status": "active",
"required_environment_variables": [
"<string>"
],
"required_secret_names": [
"<string>"
],
"is_public": true,
"attribution": "<string>",
"description": "<string>"
}Get a Benchmark.
Get a previously created Benchmark.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const benchmarkView = await client.benchmarks.retrieve('id');
console.log(benchmarkView.id);import os
from runloop_api_client import Runloop
client = Runloop(
bearer_token=os.environ.get("RUNLOOP_API_KEY"), # This is the default and can be omitted
)
benchmark_view = client.benchmarks.retrieve(
"id",
)
print(benchmark_view.id)curl --request GET \
--url https://api.runloop.ai/v1/benchmarks/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/benchmarks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.runloop.ai/v1/benchmarks/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.runloop.ai/v1/benchmarks/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runloop.ai/v1/benchmarks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"scenarioIds": [
"<string>"
],
"metadata": {},
"status": "active",
"required_environment_variables": [
"<string>"
],
"required_secret_names": [
"<string>"
],
"is_public": true,
"attribution": "<string>",
"description": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The Benchmark ID.
Response
OK
A BenchmarkDefinitionView represents a grouped set of Scenarios that together form a Benchmark.
The ID of the Benchmark.
The name of the Benchmark.
List of Scenario IDs that make up the benchmark.
User defined metadata to attach to the benchmark for organization.
Show child attributes
Show child attributes
Whether the benchmark is active or archived. Archived benchmarks are excluded from listings and cannot be run.
active, archived Required environment variables used to run the benchmark. If any required environment variables are missing, the benchmark will fail to start.
Required secrets used to run the benchmark. If any required secrets are missing, the benchmark will fail to start.
Whether this benchmark is public.
Attribution information for the benchmark.
Detailed description of the benchmark.
Was this page helpful?
