Create a monitor
Scores a sampled share of one deployment’s live traffic with one evaluator. A single_turn evaluator scores traced requests as they ship; a thread evaluator scores a thread once it has been idle for idle_minutes (again after it resumes and goes idle again). Scores carry source: monitor and the monitor’s id; a failed evaluation emits the score.failed webhook. The deployment must store trace bodies (the judge reads them). One evaluator version writes at most one monitor score per target, so two monitors running the same evaluator version on the same deployment compete: the second one’s tasks end skipped and its stats stay zero (give it its own evaluator or version). Names are unique among the workspace’s monitors.
curl --request POST \
--url https://api.veri.studio/v1/monitors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"deployment_id": "<string>",
"evaluator_id": "<string>",
"evaluator_version": 123,
"sampling_rate": 123,
"filter": {},
"idle_minutes": 123,
"daily_cap": 123,
"enabled": true,
"review_below_confidence": 123,
"review_queue_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/monitors"
payload = {
"name": "<string>",
"deployment_id": "<string>",
"evaluator_id": "<string>",
"evaluator_version": 123,
"sampling_rate": 123,
"filter": {},
"idle_minutes": 123,
"daily_cap": 123,
"enabled": True,
"review_below_confidence": 123,
"review_queue_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
deployment_id: '<string>',
evaluator_id: '<string>',
evaluator_version: 123,
sampling_rate: 123,
filter: {},
idle_minutes: 123,
daily_cap: 123,
enabled: true,
review_below_confidence: 123,
review_queue_id: '<string>'
})
};
fetch('https://api.veri.studio/v1/monitors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"name": "<string>",
"deployment_id": "<string>",
"evaluator_id": "<string>",
"evaluator_name": "<string>",
"scope": "<string>",
"sampling_rate": 123,
"filter": {},
"idle_minutes": 123,
"daily_cap": 123,
"enabled": true,
"stats": {
"scored_today": 123,
"flagged_today": 123,
"scored_7d": 123,
"flagged_7d": 123,
"last_scored_at": "2023-11-07T05:31:56Z",
"human_agreement": {
"n": 123,
"rate": 123
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"evaluator_version": 123,
"review_below_confidence": 123,
"review_queue_id": "<string>"
}Authorizations
Body
Response
The monitor
One monitor. Its stats count the scores it wrote; two monitors on the
same evaluator version and deployment compete for one score per target,
so the later one's stats stay zero.
curl --request POST \
--url https://api.veri.studio/v1/monitors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"deployment_id": "<string>",
"evaluator_id": "<string>",
"evaluator_version": 123,
"sampling_rate": 123,
"filter": {},
"idle_minutes": 123,
"daily_cap": 123,
"enabled": true,
"review_below_confidence": 123,
"review_queue_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/monitors"
payload = {
"name": "<string>",
"deployment_id": "<string>",
"evaluator_id": "<string>",
"evaluator_version": 123,
"sampling_rate": 123,
"filter": {},
"idle_minutes": 123,
"daily_cap": 123,
"enabled": True,
"review_below_confidence": 123,
"review_queue_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
deployment_id: '<string>',
evaluator_id: '<string>',
evaluator_version: 123,
sampling_rate: 123,
filter: {},
idle_minutes: 123,
daily_cap: 123,
enabled: true,
review_below_confidence: 123,
review_queue_id: '<string>'
})
};
fetch('https://api.veri.studio/v1/monitors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"name": "<string>",
"deployment_id": "<string>",
"evaluator_id": "<string>",
"evaluator_name": "<string>",
"scope": "<string>",
"sampling_rate": 123,
"filter": {},
"idle_minutes": 123,
"daily_cap": 123,
"enabled": true,
"stats": {
"scored_today": 123,
"flagged_today": 123,
"scored_7d": 123,
"flagged_7d": 123,
"last_scored_at": "2023-11-07T05:31:56Z",
"human_agreement": {
"n": 123,
"rate": 123
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"evaluator_version": 123,
"review_below_confidence": 123,
"review_queue_id": "<string>"
}
