Skip to main content
PUT
/
v1
/
metrics
Update an existing metric
curl --request PUT \
  --url https://api.honeyhive.ai/v1/metrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "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": []
  }
}
'
{
  "updated": true
}

Authorizations

Authorization
string
header
required

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

Body

application/json
id
string
required
Minimum string length: 1
name
string
Maximum string length: 200
type
enum<string>
Available options:
PYTHON,
LLM,
HUMAN,
COMPOSITE
criteria
string
Minimum string length: 1
description
string
default:""
return_type
enum<string>
default:float
Available options:
float,
boolean,
string,
categorical
enabled_in_prod
boolean
default:false
needs_ground_truth
boolean
default:false
sampling_percentage
number
default:100
Required range: 0 <= x <= 100
model_provider
string | null
model_name
string | null
scale
integer | null
threshold
object
categories
object[] | null
Minimum array length: 1
child_metrics
object[] | null
Minimum array length: 1
filters
object

Response

200 - application/json

Metric updated successfully

updated
boolean
required