ResourceSummary common.resource-summary@1

Generated at from openvibe-contracts v0.79.0 and openvibe-sdk v0.25.0.

Version
1.0.0
Owner
contracts
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-034
Schema
https://openvibe.network/contracts/common/resource-summary.v1.json

One resource of any service, as the resource index lists it (roadmap WS-Z7): every service answers GET /api/v1/resources with these, so OpenVibe.Services shows any resource without owning its data.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
kindstringyesservice.kind, e.g. watch.watch, actor.actor, media.object, events.subscription
servicestringyes
project_idstring
  • pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$
owneridentity.subject-ref
namestring
statestringyes
created_atstringyes
  • format date-time
updated_atstring
  • format date-time
usageobjectcost units by name (WS-Z1)
linksobject
  • no other fields
links.selfstring
  • format uri
links.consolestring
  • format uri
links.docsstring
  • format uri

Examples

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

Valid: watch
{
  "id": "wch_01J0000000000000000000000A",
  "kind": "watch.watch",
  "service": "watch",
  "project_id": "prj_01J0000000000000000000000A",
  "owner": {
    "type": "user",
    "id": "usr_01J0000000000000000000000A"
  },
  "name": "Price of a camera",
  "state": "active",
  "created_at": "2026-09-28T23:00:00Z",
  "usage": {
    "watch-check": 120
  },
  "links": {
    "self": "https://openvibe.watch/api/v1/watches/wch_01J0000000000000000000000A"
  }
}
Rejected: no-state
{
  "id": "x",
  "kind": "watch.watch",
  "service": "watch",
  "created_at": "2026-09-28T23:00:00Z"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('common.resource-summary@1', value);   // { valid, errors: [{ path, message }] }