Skip to main content
GET
/
monitors
/
{id}
/
results
Get monitor results
curl --request GET \
  --url https://api.galtea.ai/monitors/{id}/results \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.galtea.ai/monitors/{id}/results"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.galtea.ai/monitors/{id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.galtea.ai/monitors/{id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.galtea.ai/monitors/{id}/results"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.galtea.ai/monitors/{id}/results")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.galtea.ai/monitors/{id}/results")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "monitorId": "monitor_123",
  "range": {
    "from": "2023-11-07T05:31:56Z",
    "to": "2023-11-07T05:31:56Z",
    "bucketDays": 1
  },
  "metrics": [
    {
      "metricGroupId": "metricGroup_123",
      "name": "Accuracy",
      "headline": {
        "scoredSessions": 42,
        "score": 0.73,
        "confidenceInterval": {
          "lower": 0.68,
          "upper": 0.78
        },
        "collectingData": false
      },
      "buckets": [
        {
          "scoredSessions": 42,
          "score": 0.73,
          "confidenceInterval": {
            "lower": 0.68,
            "upper": 0.78
          },
          "collectingData": false,
          "bucket": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ],
  "worstMetric": {
    "scoredSessions": 42,
    "score": 0.73,
    "confidenceInterval": {
      "lower": 0.68,
      "upper": 0.78
    },
    "collectingData": false,
    "metricGroupId": "metricGroup_123",
    "name": "Custom judge"
  },
  "markers": {
    "metricRevisions": [
      {
        "metricGroupId": "<string>",
        "name": "<string>",
        "metricId": "<string>",
        "at": "2023-11-07T05:31:56Z"
      }
    ],
    "samplingChanges": [
      {
        "at": "2023-11-07T05:31:56Z",
        "samplingPercentage": 10
      }
    ]
  },
  "spend": {
    "spentCredits": 240,
    "pendingCredits": 12,
    "capCredits": 500,
    "cycleStart": "2023-11-07T05:31:56Z"
  },
  "sessions": {
    "scored": [
      {
        "sessionId": "<string>",
        "evaluatedAt": "2023-11-07T05:31:56Z",
        "settledAtTurn": 123,
        "description": "Evaluated at turn 6: inactivity window"
      }
    ],
    "waiting": [
      {
        "sessionId": "<string>",
        "lastTurnAt": "2023-11-07T05:31:56Z",
        "minutesSinceLastTurn": 2,
        "settlesAt": "2023-11-07T05:31:56Z",
        "description": "Waiting: last turn 2 min ago, settles at 5 min"
      }
    ]
  }
}
{
"error": "Error type",
"message": "Error message description"
}
{
"error": "Error type",
"message": "Error message description"
}
{
"error": "Error type",
"message": "Error message description"
}
{
"error": "Error type",
"message": "Error message description"
}

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Path Parameters

id
string
required

Monitor ID

Query Parameters

days
integer

Trailing window in days to aggregate (default 7, max 90).

Required range: 1 <= x <= 90

Response

Monitor results retrieved successfully

Aggregated results for a monitor over a trailing window, computed only from the monitor's own evaluations.

monitorId
string
required
Example:

"monitor_123"

range
object
required
metrics
object[]
required

One score series per bound metric family.

worstMetric
object | null
required

Lowest-scoring metric family over the range. Never an average across metrics.

markers
object
required
spend
object
required
sessions
object
required