Skip to main content
GET
/
monitors
/
{monitor_id}
/
metrics
/
by-target
Get monitor metrics by target
curl --request GET \
  --url https://api.trymaitai.ai/api/v1/monitors/{monitor_id}/metrics/by-target \
  --header 'X-Maitai-Api-Key: <api-key>'
{
  "data": [
    {
      "monitor_id": 501,
      "monitor_target_id": 9001,
      "target_type": "intent",
      "target_id": 7,
      "target_name": "order_intake",
      "sample_rate": 5,
      "enabled": true,
      "metrics": {
        "sampled_count": 200,
        "pass_count": 195,
        "error_count": 5,
        "error_rate": 0.025
      }
    },
    {
      "monitor_id": 501,
      "monitor_target_id": 9002,
      "target_type": "workflow",
      "target_id": 42,
      "target_name": "order-intake-workflow",
      "sample_rate": 5,
      "enabled": true,
      "metrics": {
        "sampled_count": 280,
        "pass_count": 255,
        "warning_count": 12,
        "error_count": 13,
        "error_rate": 0.0464
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.trymaitai.com/llms.txt

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

Authorizations

X-Maitai-Api-Key
string
header
required

Your Maitai API key from the Portal.

Path Parameters

monitor_id
integer
required

Response

200 - application/json

Get monitor metrics by target.

data
any