ReportSessionWriteResult report.session-write-result@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
report
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/report/session-write-result.v1.json

report.session-write-result@1: what POST /internal/session-reports on OpenVibe.Report answers. ID is the report's id, URL its page (openvibe.report/s/<id>) and CREATED says whether this call stored the report or found the one it had already stored (the route is idempotent per source and task ref).

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^rps_[0-9A-HJKMNP-TV-Z]{26}$
urlstringyes
  • pattern ^https://openvibe\.report/s/
  • format uri
createdbooleanyesTrue when this call stored the report, false when it was already there.

Examples

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

Valid: result
{
  "id": "rps_01JAN2C3D4E5F6G7H8J9K0MNPS",
  "url": "https://openvibe.report/s/rps_01JAN2C3D4E5F6G7H8J9K0MNPS",
  "created": true
}
Rejected: url-not-report
{
  "id": "rps_01JAN2C3D4E5F6G7H8J9K0MNPS",
  "url": "https://openvibe.example/s/rps_01JAN2C3D4E5F6G7H8J9K0MNPS",
  "created": true
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('report.session-write-result@1', value);   // { valid, errors: [{ path, message }] }