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 scenarioView = await client.scenarios.update('id');
console.log(scenarioView.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
)
scenario_view = client.scenarios.update(
id="id",
)
print(scenario_view.id)curl --request POST \
--url https://api.runloop.ai/v1/scenarios/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"input_context": {
"problem_statement": "<string>",
"additional_context": {}
},
"scoring_contract": {
"scoring_function_parameters": [
{
"name": "<string>",
"scorer": {
"search_directory": "<string>",
"pattern": "<string>",
"type": "ast_grep_scorer",
"lang": "<string>"
},
"weight": 123
}
]
},
"environment_parameters": {
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"launch_parameters": {
"launch_commands": [
"<string>"
],
"available_ports": [
123
],
"keep_alive_time_seconds": 123,
"after_idle": {
"idle_time_seconds": 123
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
}
},
"working_directory": "<string>"
},
"metadata": {},
"required_environment_variables": [
"<string>"
],
"required_secret_names": [
"<string>"
],
"reference_output": "<string>",
"scorer_timeout_sec": 123
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/scenarios/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'input_context' => [
'problem_statement' => '<string>',
'additional_context' => [
]
],
'scoring_contract' => [
'scoring_function_parameters' => [
[
'name' => '<string>',
'scorer' => [
'search_directory' => '<string>',
'pattern' => '<string>',
'type' => 'ast_grep_scorer',
'lang' => '<string>'
],
'weight' => 123
]
]
],
'environment_parameters' => [
'blueprint_id' => '<string>',
'snapshot_id' => '<string>',
'launch_parameters' => [
'launch_commands' => [
'<string>'
],
'available_ports' => [
123
],
'keep_alive_time_seconds' => 123,
'after_idle' => [
'idle_time_seconds' => 123
],
'custom_cpu_cores' => 123,
'custom_gb_memory' => 123,
'custom_disk_size' => 123,
'user_parameters' => [
'username' => '<string>',
'uid' => 123
],
'required_services' => [
'<string>'
],
'network_policy_id' => '<string>',
'lifecycle' => [
'after_idle' => [
'idle_time_seconds' => 123
],
'resume_triggers' => [
'http' => true,
'axon_event' => true
],
'lifecycle_hooks' => [
'suspend_commands' => [
'<string>'
],
'suspend_deadline_ms' => 123
]
]
],
'working_directory' => '<string>'
],
'metadata' => [
],
'required_environment_variables' => [
'<string>'
],
'required_secret_names' => [
'<string>'
],
'reference_output' => '<string>',
'scorer_timeout_sec' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runloop.ai/v1/scenarios/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"input_context\": {\n \"problem_statement\": \"<string>\",\n \"additional_context\": {}\n },\n \"scoring_contract\": {\n \"scoring_function_parameters\": [\n {\n \"name\": \"<string>\",\n \"scorer\": {\n \"search_directory\": \"<string>\",\n \"pattern\": \"<string>\",\n \"type\": \"ast_grep_scorer\",\n \"lang\": \"<string>\"\n },\n \"weight\": 123\n }\n ]\n },\n \"environment_parameters\": {\n \"blueprint_id\": \"<string>\",\n \"snapshot_id\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"working_directory\": \"<string>\"\n },\n \"metadata\": {},\n \"required_environment_variables\": [\n \"<string>\"\n ],\n \"required_secret_names\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\",\n \"scorer_timeout_sec\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runloop.ai/v1/scenarios/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"input_context\": {\n \"problem_statement\": \"<string>\",\n \"additional_context\": {}\n },\n \"scoring_contract\": {\n \"scoring_function_parameters\": [\n {\n \"name\": \"<string>\",\n \"scorer\": {\n \"search_directory\": \"<string>\",\n \"pattern\": \"<string>\",\n \"type\": \"ast_grep_scorer\",\n \"lang\": \"<string>\"\n },\n \"weight\": 123\n }\n ]\n },\n \"environment_parameters\": {\n \"blueprint_id\": \"<string>\",\n \"snapshot_id\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"working_directory\": \"<string>\"\n },\n \"metadata\": {},\n \"required_environment_variables\": [\n \"<string>\"\n ],\n \"required_secret_names\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\",\n \"scorer_timeout_sec\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runloop.ai/v1/scenarios/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"input_context\": {\n \"problem_statement\": \"<string>\",\n \"additional_context\": {}\n },\n \"scoring_contract\": {\n \"scoring_function_parameters\": [\n {\n \"name\": \"<string>\",\n \"scorer\": {\n \"search_directory\": \"<string>\",\n \"pattern\": \"<string>\",\n \"type\": \"ast_grep_scorer\",\n \"lang\": \"<string>\"\n },\n \"weight\": 123\n }\n ]\n },\n \"environment_parameters\": {\n \"blueprint_id\": \"<string>\",\n \"snapshot_id\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"working_directory\": \"<string>\"\n },\n \"metadata\": {},\n \"required_environment_variables\": [\n \"<string>\"\n ],\n \"required_secret_names\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\",\n \"scorer_timeout_sec\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"input_context": {
"problem_statement": "<string>",
"additional_context": {}
},
"scoring_contract": {
"scoring_function_parameters": [
{
"name": "<string>",
"scorer": {
"search_directory": "<string>",
"pattern": "<string>",
"type": "ast_grep_scorer",
"lang": "<string>"
},
"weight": 123
}
]
},
"metadata": {},
"environment": {
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"launch_parameters": {
"launch_commands": [
"<string>"
],
"available_ports": [
123
],
"keep_alive_time_seconds": 123,
"after_idle": {
"idle_time_seconds": 123
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
}
},
"working_directory": "<string>"
},
"reference_output": "<string>",
"required_environment_variables": [
"<string>"
],
"required_secret_names": [
"<string>"
],
"is_public": true,
"scorer_timeout_sec": 123
}Update a Scenario.
Update a Scenario. Fields that are null will preserve the existing value. Fields that are provided (including empty values) will replace the existing value entirely.
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 scenarioView = await client.scenarios.update('id');
console.log(scenarioView.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
)
scenario_view = client.scenarios.update(
id="id",
)
print(scenario_view.id)curl --request POST \
--url https://api.runloop.ai/v1/scenarios/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"input_context": {
"problem_statement": "<string>",
"additional_context": {}
},
"scoring_contract": {
"scoring_function_parameters": [
{
"name": "<string>",
"scorer": {
"search_directory": "<string>",
"pattern": "<string>",
"type": "ast_grep_scorer",
"lang": "<string>"
},
"weight": 123
}
]
},
"environment_parameters": {
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"launch_parameters": {
"launch_commands": [
"<string>"
],
"available_ports": [
123
],
"keep_alive_time_seconds": 123,
"after_idle": {
"idle_time_seconds": 123
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
}
},
"working_directory": "<string>"
},
"metadata": {},
"required_environment_variables": [
"<string>"
],
"required_secret_names": [
"<string>"
],
"reference_output": "<string>",
"scorer_timeout_sec": 123
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/scenarios/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'input_context' => [
'problem_statement' => '<string>',
'additional_context' => [
]
],
'scoring_contract' => [
'scoring_function_parameters' => [
[
'name' => '<string>',
'scorer' => [
'search_directory' => '<string>',
'pattern' => '<string>',
'type' => 'ast_grep_scorer',
'lang' => '<string>'
],
'weight' => 123
]
]
],
'environment_parameters' => [
'blueprint_id' => '<string>',
'snapshot_id' => '<string>',
'launch_parameters' => [
'launch_commands' => [
'<string>'
],
'available_ports' => [
123
],
'keep_alive_time_seconds' => 123,
'after_idle' => [
'idle_time_seconds' => 123
],
'custom_cpu_cores' => 123,
'custom_gb_memory' => 123,
'custom_disk_size' => 123,
'user_parameters' => [
'username' => '<string>',
'uid' => 123
],
'required_services' => [
'<string>'
],
'network_policy_id' => '<string>',
'lifecycle' => [
'after_idle' => [
'idle_time_seconds' => 123
],
'resume_triggers' => [
'http' => true,
'axon_event' => true
],
'lifecycle_hooks' => [
'suspend_commands' => [
'<string>'
],
'suspend_deadline_ms' => 123
]
]
],
'working_directory' => '<string>'
],
'metadata' => [
],
'required_environment_variables' => [
'<string>'
],
'required_secret_names' => [
'<string>'
],
'reference_output' => '<string>',
'scorer_timeout_sec' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runloop.ai/v1/scenarios/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"input_context\": {\n \"problem_statement\": \"<string>\",\n \"additional_context\": {}\n },\n \"scoring_contract\": {\n \"scoring_function_parameters\": [\n {\n \"name\": \"<string>\",\n \"scorer\": {\n \"search_directory\": \"<string>\",\n \"pattern\": \"<string>\",\n \"type\": \"ast_grep_scorer\",\n \"lang\": \"<string>\"\n },\n \"weight\": 123\n }\n ]\n },\n \"environment_parameters\": {\n \"blueprint_id\": \"<string>\",\n \"snapshot_id\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"working_directory\": \"<string>\"\n },\n \"metadata\": {},\n \"required_environment_variables\": [\n \"<string>\"\n ],\n \"required_secret_names\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\",\n \"scorer_timeout_sec\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runloop.ai/v1/scenarios/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"input_context\": {\n \"problem_statement\": \"<string>\",\n \"additional_context\": {}\n },\n \"scoring_contract\": {\n \"scoring_function_parameters\": [\n {\n \"name\": \"<string>\",\n \"scorer\": {\n \"search_directory\": \"<string>\",\n \"pattern\": \"<string>\",\n \"type\": \"ast_grep_scorer\",\n \"lang\": \"<string>\"\n },\n \"weight\": 123\n }\n ]\n },\n \"environment_parameters\": {\n \"blueprint_id\": \"<string>\",\n \"snapshot_id\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"working_directory\": \"<string>\"\n },\n \"metadata\": {},\n \"required_environment_variables\": [\n \"<string>\"\n ],\n \"required_secret_names\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\",\n \"scorer_timeout_sec\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runloop.ai/v1/scenarios/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"input_context\": {\n \"problem_statement\": \"<string>\",\n \"additional_context\": {}\n },\n \"scoring_contract\": {\n \"scoring_function_parameters\": [\n {\n \"name\": \"<string>\",\n \"scorer\": {\n \"search_directory\": \"<string>\",\n \"pattern\": \"<string>\",\n \"type\": \"ast_grep_scorer\",\n \"lang\": \"<string>\"\n },\n \"weight\": 123\n }\n ]\n },\n \"environment_parameters\": {\n \"blueprint_id\": \"<string>\",\n \"snapshot_id\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"working_directory\": \"<string>\"\n },\n \"metadata\": {},\n \"required_environment_variables\": [\n \"<string>\"\n ],\n \"required_secret_names\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\",\n \"scorer_timeout_sec\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"input_context": {
"problem_statement": "<string>",
"additional_context": {}
},
"scoring_contract": {
"scoring_function_parameters": [
{
"name": "<string>",
"scorer": {
"search_directory": "<string>",
"pattern": "<string>",
"type": "ast_grep_scorer",
"lang": "<string>"
},
"weight": 123
}
]
},
"metadata": {},
"environment": {
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"launch_parameters": {
"launch_commands": [
"<string>"
],
"available_ports": [
123
],
"keep_alive_time_seconds": 123,
"after_idle": {
"idle_time_seconds": 123
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
}
},
"working_directory": "<string>"
},
"reference_output": "<string>",
"required_environment_variables": [
"<string>"
],
"required_secret_names": [
"<string>"
],
"is_public": true,
"scorer_timeout_sec": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The Scenario ID.
Body
ScenarioUpdateParameters contain the set of parameters to update a Scenario. All fields are optional - null fields preserve existing values, provided fields replace entirely.
Name of the scenario. Cannot be blank.
The input context for the Scenario.
Show child attributes
Show child attributes
The scoring contract for the Scenario.
Show child attributes
Show child attributes
The Environment in which the Scenario will run.
Show child attributes
Show child attributes
User defined metadata to attach to the scenario. Pass in empty map to clear.
Show child attributes
Show child attributes
Environment variables required to run the scenario. Pass in empty list to clear.
Secrets required to run the scenario. Pass in empty list to clear.
A string representation of the reference output to solve the scenario. Commonly can be the result of a git diff or a sequence of command actions to apply to the environment. Pass in empty string to clear.
Validation strategy. Pass in empty string to clear.
UNSPECIFIED, FORWARD, REVERSE, EVALUATION Timeout for scoring in seconds. Default 30 minutes (1800s).
Response
OK
A ScenarioDefinitionView represents a repeatable AI coding evaluation test, complete with initial environment and scoring contract.
The ID of the Scenario.
The name of the Scenario.
The input context for the Scenario.
Show child attributes
Show child attributes
The scoring contract for the Scenario.
Show child attributes
Show child attributes
User defined metadata to attach to the scenario for organization.
Show child attributes
Show child attributes
Whether the scenario is active or archived. Archived scenarios are excluded from listings and cannot be updated.
active, archived The Environment in which the Scenario is run.
Show child attributes
Show child attributes
A string representation of the reference output to solve the scenario. Commonly can be the result of a git diff or a sequence of command actions to apply to the environment.
Environment variables required to run the scenario. If any required environment variables are missing, the scenario will fail to start.
Environment variables required to run the scenario. If any required secrets are missing, the scenario will fail to start.
Whether this scenario is public.
Validation strategy.
UNSPECIFIED, FORWARD, REVERSE, EVALUATION Timeout for scoring in seconds. Default 30 minutes (1800s).
Was this page helpful?
