Skip to main content
GET
/
v1
/
metric
/
definitions
JavaScript
import Roark from '@roarkanalytics/sdk';

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

const response = await client.metric.listDefinitions();

console.log(response.data);
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "slug": "<string>",
      "metricId": "<string>",
      "variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "description": "<string>",
      "supportedContexts": [],
      "calculationType": "<string>",
      "unit": {
        "name": "<string>",
        "symbol": "<string>"
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.roark.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Response

All metric definitions available in the project

data
(LLM judge metric · object | Provider metric · object | Threshold metric · object | Formula metric · object | Pattern metric · object)[]
required

Metrics response payload

Metric definition data. The variant is selected by calculationType.