Skip to main content
GET
/
monitor
/
{monitor_id}
Retrieve a monitor
from deeprails import Deeprails

DEEPRAILS_API_KEY = "YOUR_API_KEY"

client = Deeprails(
    api_key=DEEPRAILS_API_KEY,
)

monitor_response = client.monitor.retrieve(
    monitor_id="mon_123abc"
)
print(monitor_response.data.name)
print(monitor_response.data.monitor_status)
{
  "success": true,
  "data": {
    "name": "<string>",
    "description": "<string>",
    "monitor_id": "<string>",
    "user_id": "<string>",
    "monitor_status": "active",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "stats": {
      "total_evaluations": 123,
      "completed_evaluations": 123,
      "failed_evaluations": 123,
      "queued_evaluations": 123,
      "in_progress_evaluations": 123
    },
    "evaluations": [
      {
        "eval_id": "<string>",
        "evaluation_status": "in_progress",
        "guardrail_metrics": [
          "correctness"
        ],
        "model_used": "<string>",
        "run_mode": "precision_plus",
        "model_input": {
          "system_prompt": "<string>",
          "user_prompt": "<string>",
          "ground_truth": "<string>"
        },
        "model_output": "<string>",
        "nametag": "<string>",
        "progress": 50,
        "evaluation_result": {},
        "evaluation_total_cost": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "error_message": "<string>",
        "error_timestamp": "2023-11-07T05:31:56Z",
        "start_timestamp": "2023-11-07T05:31:56Z",
        "end_timestamp": "2023-11-07T05:31:56Z",
        "modified_at": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "message": "<string>"
}
Returns comprehensive information for the monitor including name, description, monitor_status and observability stats.

The response includes a stats object with counts of the evaluations in each status and an evaluations array containing all evaluation records.

Use the optional limit query parameter to control the number of returned evaluations (defaults to 10).

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 to retrieve.

Query Parameters

limit
integer
default:10

Limit the returned events associated with this monitor. Defaults to 10.

Response

Monitor retrieved successfully

Response wrapper for operations returning a MonitorDetailResponse.

success
boolean
required

Represents whether the request was completed successfully.

data
object
message
string

The accompanying message for the request. Includes error details when applicable.

I