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

const client = new Scorecard({
  apiKey: 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

Response

201
application/json

Run created successfully

A Run in the Scorecard system.