from parallel import Parallel
client = Parallel()
monitor = client.monitor.cancel("monitor_id")
print(monitor.status)import Parallel from "parallel-web";
const client = new Parallel();
const monitor = await client.monitor.cancel('monitor_id');
console.log(monitor.status);HttpResponse<String> response = Unirest.post("https://api.parallel.ai/v1/monitors/{monitor_id}/cancel")
.header("x-api-key", "<api-key>")
.asString();curl --request POST \
--url https://api.parallel.ai/v1/monitors/{monitor_id}/cancel \
--header 'x-api-key: <api-key>'{
"type": "event_stream",
"monitor_id": "<string>",
"status": "active",
"frequency": "1h",
"processor": "lite",
"created_at": "2025-01-15T10:30:00Z",
"settings": {
"query": "Extract recent news about AI",
"output_schema": {
"json_schema": {
"additionalProperties": false,
"properties": {
"gdp": {
"description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
"type": "string"
}
},
"required": [
"gdp"
],
"type": "object"
},
"type": "json"
},
"include_backfill": true,
"advanced_settings": {
"source_policy": {
"include_domains": [
"wikipedia.org",
"docs.python.org/3",
".edu"
]
},
"location": "us"
}
},
"webhook": {
"url": "https://example.com/webhook",
"event_types": [
"monitor.event.detected"
]
},
"metadata": {
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
},
"last_run_at": "2025-01-15T10:30:00Z",
"output": {
"latest_snapshot": {
"basis": [
{
"field": "<string>",
"reasoning": "<string>",
"citations": [],
"confidence": "low"
}
],
"type": "text",
"content": "<string>",
"mcp_tool_calls": [
{
"tool_call_id": "<string>",
"server_name": "<string>",
"tool_name": "<string>",
"arguments": "<string>",
"content": "<string>",
"error": "<string>"
}
],
"beta_fields": {}
}
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unauthorized: invalid or missing credentials"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Monitor not found"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unprocessable content: request validation error"
}
}Cancel Monitor
Cancel a monitor.
Permanently stops the monitor from running. Cancellation is irreversible — create a new monitor to resume monitoring. Cancelling an already-cancelled monitor is a no-op.
from parallel import Parallel
client = Parallel()
monitor = client.monitor.cancel("monitor_id")
print(monitor.status)import Parallel from "parallel-web";
const client = new Parallel();
const monitor = await client.monitor.cancel('monitor_id');
console.log(monitor.status);HttpResponse<String> response = Unirest.post("https://api.parallel.ai/v1/monitors/{monitor_id}/cancel")
.header("x-api-key", "<api-key>")
.asString();curl --request POST \
--url https://api.parallel.ai/v1/monitors/{monitor_id}/cancel \
--header 'x-api-key: <api-key>'{
"type": "event_stream",
"monitor_id": "<string>",
"status": "active",
"frequency": "1h",
"processor": "lite",
"created_at": "2025-01-15T10:30:00Z",
"settings": {
"query": "Extract recent news about AI",
"output_schema": {
"json_schema": {
"additionalProperties": false,
"properties": {
"gdp": {
"description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
"type": "string"
}
},
"required": [
"gdp"
],
"type": "object"
},
"type": "json"
},
"include_backfill": true,
"advanced_settings": {
"source_policy": {
"include_domains": [
"wikipedia.org",
"docs.python.org/3",
".edu"
]
},
"location": "us"
}
},
"webhook": {
"url": "https://example.com/webhook",
"event_types": [
"monitor.event.detected"
]
},
"metadata": {
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
},
"last_run_at": "2025-01-15T10:30:00Z",
"output": {
"latest_snapshot": {
"basis": [
{
"field": "<string>",
"reasoning": "<string>",
"citations": [],
"confidence": "low"
}
],
"type": "text",
"content": "<string>",
"mcp_tool_calls": [
{
"tool_call_id": "<string>",
"server_name": "<string>",
"tool_name": "<string>",
"arguments": "<string>",
"content": "<string>",
"error": "<string>"
}
],
"beta_fields": {}
}
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unauthorized: invalid or missing credentials"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Monitor not found"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unprocessable content: request validation error"
}
}Authorizations
Path Parameters
Response
Monitor cancelled successfully.
Response object for a monitor.
The type field at the root determines the concrete shape of settings:
event_stream uses MonitorEventStreamResponseSettings, and snapshot
uses MonitorSnapshotResponseSettings. Snapshot monitors also carry an
output field (MonitorSnapshotOutput) with the latest computed state.
The type of monitor.
event_stream, snapshot "event_stream"
"snapshot"
ID of the monitor.
Status of the monitor.
active, cancelled "active"
"cancelled"
Frequency of the monitor. Format: '' where unit is 'h' (hours), 'd' (days), or 'w' (weeks). Must be between 1h and 30d (inclusive).
"1h"
"12h"
"1d"
"7d"
"30d"
Processor to use for the monitor. lite is faster and cheaper; base performs more thorough analysis at higher cost and latency. Defaults to lite.
lite, base "lite"
"base"
Timestamp of the creation of the monitor, as an RFC 3339 string.
"2025-01-15T10:30:00Z"
Type-specific response fields for an event_stream monitor.
- MonitorEventStreamResponseSettings
- MonitorSnapshotResponseSettings
Show child attributes
Show child attributes
Webhook configuration for the monitor.
Show child attributes
Show child attributes
User-provided metadata stored with the monitor and echoed back in webhook notifications and GET responses, so you can map events to objects in your application. Keys: max 16 chars; values: max 512 chars.
Show child attributes
Show child attributes
{
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
}
Timestamp of the last run for the monitor, as an RFC 3339 string.
"2025-01-15T10:30:00Z"
Runtime output state. Present only for snapshot monitors; null for event_stream monitors.
Show child attributes
Show child attributes