POST
/
projects
/
{projectId}
/
runs
JavaScript
import Scorecard from 'scorecard-ai';

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

const run = await client.runs.create('314', {
  metricIds: ['789', '101'],
  systemVersionId: '87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0',
  testsetId: '246',
});

console.log(run.id);
{
"id": "135",
"testsetId": "246",
"systemVersionId": "87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0",
"metricIds": [
"789",
"101"
]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

projectId
string
required

The ID of the Project.

Example:

"314"

Body

application/json
metricIds
string[]
required

The IDs of the metrics this Run is using.

testsetId
string | null

The ID of the Testset this Run is testing.

systemVersionId
string<uuid>

The ID of the system version this Run is using.

Response

Run created successfully

A Run in the Scorecard system.

id
string
required

The ID of the Run.

testsetId
string | null
required

The ID of the Testset this Run is testing.

metricIds
string[]
required

The IDs of the metrics this Run is using.

status
enum<string>
required

The status of the Run.

Available options:
pending,
awaiting_execution,
running_execution,
awaiting_scoring,
running_scoring,
awaiting_human_scoring,
completed
systemVersionId
string<uuid>

The ID of the system version this Run is using.