Change a monitor
Send only the fields to change: `name`, `selector`, `interval_seconds`, `webhook_endpoint_id`, `confirm_checks`, `js_render` or `enabled`.
Requires scope: monitors
Send only the fields to change: name, selector, interval_seconds, webhook_endpoint_id,
confirm_checks, js_render or enabled. Any other field is a 400.
A disabled monitor stays disabled until you send enabled: true. That also clears disabled_reason and
last_error, resets consecutive_failures to 0, and makes the next check due now. Re-enable only once the
cause is fixed: the page is back, or the key and credits are good again.
Authorization
bearerAuth Authorization: Bearer <key>. Read the key from the SPICRAWL_API_KEY environment
variable; never hard-code or log it. spicrawl_test_… keys can never spend live
credits. Scopes: scrape, batch, sessions (granted by default), browser
and read (granted deliberately), and partner (only on a partner account's key).
A missing scope is 403 ERR::AUTH::INSUFFICIENT_SCOPE naming the scope.
In: header
Path Parameters
The monitor id returned by POST /v1/monitors. An id of another organization answers 404.
1 <= length <= 64Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Body of PATCH /v1/monitors/{monitorID}. Send at least one field. Unknown fields are a 400. scope cannot be changed, so sending it is a 400.
1 <= propertiesResponse Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X PATCH "https://example.com/v1/monitors/string" \ -H "Content-Type: application/json" \ -d '{ "enabled": true }'{ "id": "0190f5c4-2b7a-7e10-8d3f-6a1c9e4b2d70", "name": "string", "url": "http://example.com", "selector": "string", "js_render": true, "interval_seconds": 60, "current_interval_seconds": 0, "confirm_checks": 1, "webhook_endpoint_id": "string", "enabled": true, "disabled_reason": "string", "last_error": "string", "last_checked_at": "2019-08-24T14:15:22Z", "last_changed_at": "2019-08-24T14:15:22Z", "next_check_at": "2019-08-24T14:15:22Z", "consecutive_failures": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "scope": "page", "max_pages": 1, "include_paths": [ "string" ], "exclude_paths": [ "string" ], "max_credits_per_run": 1, "pages_tracked": 0, "last_run": { "checked": 0, "skipped": 0, "changed": 0, "added": 0, "removed": 0, "credits": 0, "truncated": true }}