curl --request PATCH \
--url https://api.coval.dev/v1/metrics/{metric_id}/baselines/{baseline_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": "ACTIVE"
}
'
{
"ulid": "01HXKZ4M5N6P7Q8R9STVWXYZAB",
"status": "ACTIVE",
"detection_method": "EWMA",
"sigma_threshold": 123,
"direction": "BOTH",
"created_at": "2023-11-07T05:31:56Z",
"last_updated_at": "2023-11-07T05:31:56Z",
"metric_id": "<string>",
"agent_id": "<string>",
"test_set_id": "<string>",
"persona_id": "<string>",
"display_name": "<string>",
"baseline_float": 123,
"baseline_sigma": 123,
"observation_count": 0,
"sigma_bands": {},
"last_processed_run_completed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "<string>",
"details": [
{
"field": "<string>",
"description": "<string>"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Metric not found",
"details": [
{
"field": "metric_id",
"description": "No metric found with this ID"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error"
}
}Baselines
Update metric baseline
Update mutable fields on an anomaly-detection baseline. All fields optional.
PATCH
/
metrics
/
{metric_id}
/
baselines
/
{baseline_id}
curl --request PATCH \
--url https://api.coval.dev/v1/metrics/{metric_id}/baselines/{baseline_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": "ACTIVE"
}
'
{
"ulid": "01HXKZ4M5N6P7Q8R9STVWXYZAB",
"status": "ACTIVE",
"detection_method": "EWMA",
"sigma_threshold": 123,
"direction": "BOTH",
"created_at": "2023-11-07T05:31:56Z",
"last_updated_at": "2023-11-07T05:31:56Z",
"metric_id": "<string>",
"agent_id": "<string>",
"test_set_id": "<string>",
"persona_id": "<string>",
"display_name": "<string>",
"baseline_float": 123,
"baseline_sigma": 123,
"observation_count": 0,
"sigma_bands": {},
"last_processed_run_completed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "<string>",
"details": [
{
"field": "<string>",
"description": "<string>"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Metric not found",
"details": [
{
"field": "metric_id",
"description": "No metric found with this ID"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error"
}
}Path Parameters
Body
application/json
Request body for updating a baseline. All fields optional.
Response
Baseline updated successfully
Anomaly-detection baseline for a metric.
Was this page helpful?