Skip to main content
POST
/
v1
/
benchmarks
/
{id}
JavaScript
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.update('id');

console.log(benchmarkView.id);
{
  "id": "<string>",
  "name": "<string>",
  "scenarioIds": [
    "<string>"
  ],
  "metadata": {},
  "required_environment_variables": [
    "<string>"
  ],
  "required_secret_names": [
    "<string>"
  ],
  "is_public": true,
  "attribution": "<string>",
  "description": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The Benchmark ID.

Body

application/json

BenchmarkUpdateParameters contain the set of parameters to update a Benchmark. All fields are optional - null fields preserve existing values, provided fields replace entirely.

name
string | null

The unique name of the Benchmark. Cannot be blank.

scenario_ids
string[] | null

The Scenario IDs that make up the Benchmark. Pass in empty list to clear.

metadata
object

User defined metadata to attach to the benchmark. Pass in empty map to clear.

required_environment_variables
string[] | null

Environment variables required to run the benchmark. If any required variables are not supplied, the benchmark will fail to start. Pass in empty list to clear.

required_secret_names
string[] | null

Secrets required to run the benchmark with (environment variable name will be mapped to the your user secret by name). If any of these secrets are not provided or the mapping is incorrect, the benchmark will fail to start. Pass in empty list to clear.

attribution
string | null

Attribution information for the benchmark. Pass in empty string to clear.

description
string | null

Detailed description of the benchmark. Pass in empty string to clear.

Response

200 - application/json

OK

A BenchmarkDefinitionView represents a grouped set of Scenarios that together form a Benchmark.

id
string
required

The ID of the Benchmark.

name
string
required

The name of the Benchmark.

scenarioIds
string[]
required

List of Scenario IDs that make up the benchmark.

metadata
object
required

User defined metadata to attach to the benchmark for organization.

required_environment_variables
string[]

Required environment variables used to run the benchmark. If any required environment variables are missing, the benchmark will fail to start.

required_secret_names
string[]

Required secrets used to run the benchmark. If any required secrets are missing, the benchmark will fail to start.

is_public
boolean

Whether this benchmark is public.

attribution
string

Attribution information for the benchmark.

description
string

Detailed description of the benchmark.