API Reference
Auto-generated
Monitors
API reference for monitors endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.POST /api/v1/monitors
POST
/api/v1/monitorsCreate Monitor
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Name |
| url | string | Required | URL to monitor for changes |
| formats | string[] | Optional | formats |
| check_interval | string | Optional | Cron expression for check frequency, e.g. '0 */6 * * *' (every 6h)Default: 0 */6 * * * |
| timezone | string | Optional | TimezoneDefault: UTC |
| diff_mode | "semantic" | "exact" | "selector" | Optional | Diff algorithm: semantic (structural), exact (byte-level), selector (CSS selectors)Default: semantic |
| monitor_selectors | string[] | Optional | monitor_selectors |
| notify_on | "change" | "always" | Optional | When to fire webhook: 'change' (only on diff) or 'always' (every check)Default: change |
| options | object | Optional | options |
| webhook_url | string | Optional | webhook_url |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/monitors \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"url": "example_url",
"check_interval": "example_check_interval",
"timezone": "example_timezone"
}'Response Example
JSON
{
"status": "ok"
}GET /api/v1/monitors
GET
/api/v1/monitorsList Monitors
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | Optional | limitDefault: 20 |
| offset | integer | Optional | offsetDefault: 0 |
| active_only | boolean | Optional | active_onlyDefault: False |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/monitors \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"monitors": [],
"total": 0
}GET /api/v1/monitors/{monitor_id}
GET
/api/v1/monitors/{monitor_id}Get Monitor
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| monitor_id | string | Required | monitor_id |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/monitors/<monitor_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"name": "example",
"url": "example",
"formats": "example",
"check_interval": "example",
"timezone": "example"
}PATCH /api/v1/monitors/{monitor_id}
PATCH
/api/v1/monitors/{monitor_id}Update Monitor
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| monitor_id | string | Required | monitor_id |
| name | string | Optional | name |
| url | string | Optional | url |
| check_interval | string | Optional | check_interval |
| timezone | string | Optional | timezone |
| diff_mode | "semantic" | "exact" | "selector" | Optional | diff_mode |
| monitor_selectors | string[] | Optional | monitor_selectors |
| notify_on | "change" | "always" | Optional | notify_on |
| options | object | Optional | options |
| webhook_url | string | Optional | webhook_url |
Request Example
Bash
curl -X PATCH https://api.alterlab.io/api/v1/monitors/<monitor_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"name": "example",
"url": "example",
"formats": "example",
"check_interval": "example",
"timezone": "example"
}DELETE /api/v1/monitors/{monitor_id}
DELETE
/api/v1/monitors/{monitor_id}Delete Monitor
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| monitor_id | string | Required | monitor_id |
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/monitors/<monitor_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}GET /api/v1/monitors/{monitor_id}/diffs
GET
/api/v1/monitors/{monitor_id}/diffsList Changes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| monitor_id | string | Required | monitor_id |
| limit | integer | Optional | limitDefault: 20 |
| offset | integer | Optional | offsetDefault: 0 |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/monitors/<monitor_id>/diffs \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"changes": [],
"total": 0
}GET /api/v1/monitors/{monitor_id}/diffs/{change_id}
GET
/api/v1/monitors/{monitor_id}/diffs/{change_id}Get Change
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| monitor_id | string | Required | monitor_id |
| change_id | string | Required | change_id |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/monitors/<monitor_id>/diffs/<change_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"schedule_id": "example",
"previous_snapshot_id": "example",
"current_snapshot_id": "example",
"url": "example",
"change_type": "example"
}POST /api/v1/monitors/{monitor_id}/pause
POST
/api/v1/monitors/{monitor_id}/pausePause Monitor
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| monitor_id | string | Required | monitor_id |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/monitors/<monitor_id>/pause \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"name": "example",
"url": "example",
"formats": "example",
"check_interval": "example",
"timezone": "example"
}POST /api/v1/monitors/{monitor_id}/resume
POST
/api/v1/monitors/{monitor_id}/resumeResume Monitor
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| monitor_id | string | Required | monitor_id |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/monitors/<monitor_id>/resume \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"name": "example",
"url": "example",
"formats": "example",
"check_interval": "example",
"timezone": "example"
}GET /api/v1/monitors/{monitor_id}/snapshots
GET
/api/v1/monitors/{monitor_id}/snapshotsList Snapshots
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| monitor_id | string | Required | monitor_id |
| limit | integer | Optional | limitDefault: 20 |
| offset | integer | Optional | offsetDefault: 0 |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/monitors/<monitor_id>/snapshots \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"snapshots": [],
"total": 0
}GET /api/v1/monitors/{monitor_id}/snapshots/{snapshot_id}
GET
/api/v1/monitors/{monitor_id}/snapshots/{snapshot_id}Get Snapshot
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| monitor_id | string | Required | monitor_id |
| snapshot_id | string | Required | snapshot_id |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/monitors/<monitor_id>/snapshots/<snapshot_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"schedule_id": "example",
"run_id": "example",
"url": "example",
"content_hash": "example",
"content": {}
}