POST
/
v1
/
scenarios
/
runs
/
{id}
/
complete
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const scenarioRunView = await client.scenarios.runs.complete('id');

  console.log(scenarioRunView.id);
}

main();
{
  "id": "<string>",
  "name": "<string>",
  "scenario_id": "<string>",
  "devbox_id": "<string>",
  "benchmark_run_id": "<string>",
  "scoring_contract_result": {
    "score": 123,
    "scoring_function_results": [
      {
        "score": 123,
        "scoring_function_name": "<string>",
        "output": "<string>",
        "state": "unknown"
      }
    ]
  },
  "start_time_ms": 123,
  "duration_ms": 123,
  "state": "running",
  "metadata": {}
}

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 ScenarioRun ID.

Response

200 - application/json
OK

A ScenarioRunView represents a single run of a Scenario on a Devbox. When completed, the ScenarioRun will contain the final score and output of the run.