VisionFaceLibraryRequest vision.face-library-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/face-library-request.v1.json

vision.face-library-request@1: POST /api/v1/faces/library/cluster (region-gated), GET /library/groups and POST /library/correct. `action` is cluster (default), exclude, merge or split; `ids` names up to 100 of the caller's own clusters; `region` is a jurisdiction code the host allows. Unknown faces stay unlabelled.

Fields

FieldTypeRequiredDescriptionConstraints
actionenumyes
  • one of "cluster", "exclude", "merge", "split"
regionstring
  • maxLength 10
idsarray of string
  • minItems 1
  • maxItems 100
  • items: maxLength 40

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: one
{
  "action": "cluster",
  "region": "US-IL"
}
Rejected: one
{
  "action": "delete",
  "ids": [
    "fcl_01J8Z3Q4R5S6T7V8W9X0Y1Z2A4"
  ]
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('vision.face-library-request@1', value);   // { valid, errors: [{ path, message }] }