Skip to main content
PUT
/
monitor
/
{monitor_id}
Update a monitor
from deeprails import Deeprails

DEEPRAILS_API_KEY = "YOUR_API_KEY"

client = Deeprails(
    api_key=DEEPRAILS_API_KEY,
)

monitor_response = client.monitor.update(
    monitor_id="mon_123abc",
    name="Chatbot Monitor"
)
print(monitor_response.data.monitor_id)
print(monitor_response.data.name)
{
  "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"
  },
  "message": "<string>"
}
The request body can include fields to update name, description, and monitor_status (active or inactive) of the monitor.

Setting monitor_status to inactive will stop the monitor from recording and evaluating new events.

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 edit.

Body

application/json
name
string

Name of the monitor.

description
string

Description of the monitor.

monitor_status
enum<string>

Status of the monitor. Can be active or inactive. Inactive monitors no longer record and evaluate events.

Available options:
active,
inactive

Response

Monitor updated successfully

Response wrapper for operations returning a MonitorResponse.

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