Skip to main content
POST
/
v1
/
metrics
/
run_metric
Run a metric evaluation
curl --request POST \
  --url https://api.honeyhive.ai/v1/metrics/run_metric \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metric": {
    "name": "<string>",
    "type": "PYTHON",
    "criteria": "<string>",
    "description": "",
    "return_type": "float",
    "enabled_in_prod": false,
    "needs_ground_truth": false,
    "sampling_percentage": 100,
    "model_provider": "<string>",
    "model_name": "<string>",
    "scale": 123,
    "threshold": {
      "min": 123,
      "max": 123,
      "pass_when": true,
      "passing_categories": [
        "<string>"
      ]
    },
    "categories": [
      {
        "category": "<string>",
        "score": 123
      }
    ],
    "child_metrics": [
      {
        "name": "<string>",
        "weight": 123,
        "id": "<string>",
        "scale": 123
      }
    ],
    "filters": {
      "filterArray": []
    }
  },
  "event": "<unknown>"
}
'

Authorizations

Authorization
string
header
required

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

Body

application/json
metric
object
required
event
any

Response

200 - application/json

Metric execution result