Skip to main content
GET
/
monitor
/
{monitor_id}
/
events
/
{event_id}
Retrieve a Monitor Event's Details
from deeprails import DeepRails

DEEPRAILS_API_KEY = "YOUR_API_KEY"

client = DeepRails(
    api_key=DEEPRAILS_API_KEY,
)

event_response = client.monitor.retrieve_event(
    monitor_id="mon_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    event_id="evt_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
)
print(event_response)
{
  "event_id": "evt_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "monitor_id": "mon_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "timestamp": "2025-01-15T10:30:00Z",
  "status": "completed",
  "model_input": {
    "system_prompt": "You are a helpful assistant.",
    "user_prompt": "Hello, how are you?"
  },
  "model_output": "I am good, thank you!",
  "eval_time": 10.5,
  "run_mode": "smart",
  "nametag": "Test Event",
  "evaluation_result": {
    "correctness": {
      "score": 1,
      "rationale": "The response is correct.",
      "threshold": 0.9
    }
  },
  "guardrail_metrics": [
    "correctness"
  ],
  "capabilities": [
    {
      "capability": "web_search"
    }
  ],
  "files": [
    {
      "file_name": "example.pdf",
      "file_id": "file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "file_size": 1024
    }
  ]
}
Monitor events include a detailed set of data from the corresponding evaluation. Poll this endpoint for these details, plus the status, input parameters, and timestamps.

When waiting on the completion of an event, you can poll this endpoint until the status is completed, then all the evaluation details will be available.

Authorizations

Authorization
string
header
required

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

Path Parameters

monitor_id
string
required

The ID of the monitor associated with this event.

event_id
string
required

The ID of the requested monitor event.

Response

Monitor event retrieved successfully

event_id
string

A unique monitor event ID.

Example:

"evt_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

monitor_id
string

Monitor ID associated with this event.

Example:

"mon_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

timestamp
string<date-time>

The time the monitor event was created in UTC.

Example:

"2025-01-15T10:30:00Z"

status
enum<string>

Status of the monitor event's evaluation.

Available options:
in_progress,
completed,
canceled,
queued,
failed
Example:

"completed"

model_input
object

The model input used to create the monitor event.

Example:
{
"system_prompt": "You are a helpful assistant.",
"user_prompt": "Hello, how are you?"
}
model_output
string

The output evaluated by the monitor event.

Example:

"I am good, thank you!"

eval_time
string

The time spent on the evaluation in seconds.

Example:

10.5

run_mode
enum<string>

The run mode used to evaluate the monitor event.

Available options:
precision_plus,
precision,
smart,
economy
Example:

"smart"

nametag
string

A human-readable tag for the monitor event.

Example:

"Test Event"

evaluation_result
object

The result of the evaluation of the monitor event.

Example:
{
"correctness": {
"score": 1,
"rationale": "The response is correct.",
"threshold": 0.9
}
}
guardrail_metrics
string[]

The guardrail metrics evaluated by the monitor event.

The name of the guardrail metric.

capabilities
object[]

The extended AI capabilities associated with the monitor event. Can be web_search, file_search, and/or context_awareness.

files
object[]

The files associated with the monitor event.