Visual Monitoring API
Screenshot-based visual regression detection. This page lists all 9 endpoints in the Visual Monitoring area of the Visual Sentinel REST API.
Base URL: https://visualsentinel.com. Unless an endpoint says otherwise it accepts an API key or a session cookie, see Authentication. Most error responses use the ErrorResponse shape, see Errors and Rate limits.
Endpoints
- Capture sub-page screenshot:
POST /api/monitors/{id}/sub-pages/{subPageId}/capture - Get sub-page visual data:
GET /api/monitors/{id}/sub-pages/{subPageId}/visual - Get visual monitoring data:
GET /api/monitors/{id}/visual - Capture screenshot:
POST /api/monitors/{id}/visual/capture - Set visual baseline:
POST /api/monitors/{id}/visual/baseline - Compare visual snapshots:
POST /api/monitors/{id}/visual/compare - Get deletable snapshots:
GET /api/monitors/{id}/visual/delete - Delete visual snapshots (POST):
POST /api/monitors/{id}/visual/delete - Delete visual snapshots:
DELETE /api/monitors/{id}/visual/delete
Capture sub-page screenshot
POST /api/monitors/{id}/sub-pages/{subPageId}/capture
Queue a screenshot of a sub-page now. Refused with 409 VISUAL_DISABLED while the monitor's visual checks are off, 403 LIMIT_EXCEEDED when the monitor is not within the plan's visual monitor limit (or visual checks are off and the limit is reached), 409 SUBPAGE_NOT_ON_PLAN for a page beyond the plan's page limit, and 409 VISUAL_TARGET_NOT_READY when the page's capture target is not set up yet.
Parameters
id(path, string (uuid), required)subPageId(path, string (uuid), required)
Responses
200: Screenshot captured.403:LIMIT_EXCEEDED(feature: maxVisualMonitors) orFEATURE_RESTRICTED.409: Not captured:VISUAL_DISABLED,SUBPAGE_NOT_ON_PLAN,VISUAL_TARGET_NOT_READY, or the site is down right now (siteDown: true).
Get sub-page visual data
GET /api/monitors/{id}/sub-pages/{subPageId}/visual
Get visual monitoring data for a specific sub-page.
Parameters
id(path, string (uuid), required)subPageId(path, string (uuid), required)
Responses
200: Sub-page visual data.
Get visual monitoring data
GET /api/monitors/{id}/visual
Get visual monitoring history and screenshots.
Parameters
id(path, string (uuid), required)
Responses
200: Visual monitoring data. Body: VisualDataResponse.
Capture screenshot
POST /api/monitors/{id}/visual/capture
Capture a new screenshot for visual comparison. Only for a monitor with visual checks on and within the plan's visual monitor limit, the same rules as the scheduled captures. A monitor with visual checks off is refused with 409 VISUAL_DISABLED, or with 403 LIMIT_EXCEEDED when the workspace is also at its visual monitor limit (visual checks could not be turned on). A monitor past the limit after a plan change is refused with 403 LIMIT_EXCEEDED.
Parameters
id(path, string (uuid), required)
Responses
200: Screenshot captured. Body: object.403: Plan restriction:LIMIT_EXCEEDED(feature: maxVisualMonitors, the workspace is at or over its visual monitor limit) orFEATURE_RESTRICTED(the plan has no visual checks).409: Not captured:VISUAL_DISABLED(visual checks are off for this monitor; turn them on first), or the site is down right now (siteDown: true).
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | |
screenshotUrl | string | No |
Set visual baseline
POST /api/monitors/{id}/visual/baseline
Set the current screenshot as the baseline for visual comparisons.
Parameters
id(path, string (uuid), required)
Responses
200: Baseline set.
Compare visual snapshots
POST /api/monitors/{id}/visual/compare
Compare two visual snapshots and return diff percentage.
Parameters
id(path, string (uuid), required)
Responses
200: Comparison result with diff percentage.
Get deletable snapshots
GET /api/monitors/{id}/visual/delete
List visual snapshots that can be deleted.
Parameters
id(path, string (uuid), required)
Responses
200: List of deletable snapshots.
Delete visual snapshots (POST)
POST /api/monitors/{id}/visual/delete
Delete specific visual snapshots by IDs.
Parameters
id(path, string (uuid), required)
Responses
200: Snapshots deleted.
Delete visual snapshots
DELETE /api/monitors/{id}/visual/delete
Delete visual monitoring data.
Parameters
id(path, string (uuid), required)
Responses
200: Snapshots deleted.
Data models
Request and response shapes these endpoints use: VisualDataResponse.
Generated from the OpenAPI 3.1 specification at https://docs.visualsentinel.com/openapi.json, the same file the interactive reference reads.