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

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

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

  console.log(run.id);
}

main();
{
  "id": "135",
  "testsetId": "246",
  "systemConfigId": "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
testsetId
string
required

The ID of the Testset this Run is testing.

metricIds
string[]
required

The IDs of the metrics this Run is using.

systemConfigId
string

The ID of the system configuration this Run is using.

Response

201
application/json
Run created successfully

A Run in the Scorecard system.

id
string
required

The ID of the Run.

testsetId
string
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
systemConfigId
string

The ID of the system configuration this Run is using.