Skip to main content
POST
/
v1
/
scenarios
/
{id}
/
archive
Archive a Scenario.
curl --request POST \
  --url https://api.runloop.ai/v1/scenarios/{id}/archive \
  --header 'Authorization: Bearer <token>'
{
  "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": {},
  "status": "active",
  "environment": {
    "blueprint_id": "<string>",
    "snapshot_id": "<string>",
    "launch_parameters": {
      "launch_commands": [
        "<string>"
      ],
      "resource_size_request": "X_SMALL",
      "keep_alive_time_seconds": 123,
      "available_ports": [
        123
      ],
      "after_idle": {
        "idle_time_seconds": 123,
        "on_idle": "shutdown"
      },
      "custom_cpu_cores": 123,
      "custom_gb_memory": 123,
      "custom_disk_size": 123,
      "architecture": "x86_64",
      "user_parameters": {
        "username": "<string>",
        "uid": 123
      },
      "required_services": [
        "<string>"
      ],
      "network_policy_id": "<string>"
    },
    "working_directory": "<string>"
  },
  "reference_output": "<string>",
  "required_environment_variables": [
    "<string>"
  ],
  "required_secret_names": [
    "<string>"
  ],
  "is_public": true,
  "validation_type": "UNSPECIFIED",
  "scorer_timeout_sec": 123
}

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 ID of the Scenario to archive.

Response

OK

A ScenarioDefinitionView represents a repeatable AI coding evaluation test, complete with initial environment and scoring contract.

id
string
required

The ID of the Scenario.

name
string
required

The name of the Scenario.

input_context
object
required

The input context for the Scenario.

scoring_contract
object
required

The scoring contract for the Scenario.

metadata
object
required

User defined metadata to attach to the scenario for organization.

status
enum<string>
required

Whether the scenario is active or archived. Archived scenarios are excluded from listings and cannot be updated.

Available options:
active,
archived
environment
object

The Environment in which the Scenario is run.

reference_output
string | null

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.

required_environment_variables
string[]

Environment variables required to run the scenario. If any required environment variables are missing, the scenario will fail to start.

required_secret_names
string[]

Environment variables required to run the scenario. If any required secrets are missing, the scenario will fail to start.

is_public
boolean

Whether this scenario is public.

validation_type
enum<string> | null

Validation strategy.

Available options:
UNSPECIFIED,
FORWARD,
REVERSE,
EVALUATION
scorer_timeout_sec
integer<int32> | null

Timeout for scoring in seconds. Default 30 minutes (1800s).