VisionWatchRequest vision.watch-request@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- vision
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/vision/watch-request.v1.json
vision.watch-request@1: the body of POST /api/v1/watch (owner-granted camera alerts). `classes` names 1–20 things to look for (snow, delivery, package, a DETR label, or "scene change"); `previous_image` is required for a scene change and is compared by histogram.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
image | string | The image as a data URL (base64). |
| |
image_url | string | A public image URL, fetched through Vision's private-address guard. |
| |
classes | array of string | yes |
| |
previous_image | string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: one
{
"image": "data:image/png;base64,iVBORw0KGgo=",
"classes": [
"package",
"scene change"
],
"previous_image": "data:image/png;base64,iVBORw0KGgo="
}Rejected: one
{
"image": "data:image/png;base64,iVBORw0KGgo=",
"classes": []
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('vision.watch-request@1', value); // { valid, errors: [{ path, message }] }