LinkAccessRequest link.access-request@1

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

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/link/access-request.v1.json

A machine asks another for bounded access.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^[a-z]{3}_[A-Za-z0-9_-]{8,80}$
from_principalstringyes
  • pattern ^lnk_[0-9A-HJKMNP-TV-Z]{26}$
to_principalstringyes
  • pattern ^lnk_[0-9A-HJKMNP-TV-Z]{26}$
from_ownerstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
to_ownerstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
from_agentstring
  • pattern ^agt_[0-9A-HJKMNP-TV-Z]{26}$
scopesarray of enumyes
  • minItems 1
  • unique items
  • items: one of "agent", "send", "screen", "desk", "computer", "worker"
reasonstring
  • maxLength 500
statusenumyes
  • one of "pending", "approved", "denied", "expired"
requested_atstringyes
  • format date-time
expires_atstringyes
  • format date-time
duration_secondsintegeryes
  • minimum 60
  • maximum 2592000

Examples

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

Valid: example
{
  "id": "req_12345678",
  "from_principal": "lnk_AAAAAAAAAAAAAAAAAAAAAAAAAA",
  "to_principal": "lnk_BBBBBBBBBBBBBBBBBBBBBBBBBB",
  "from_owner": "usr_AAAAAAAAAAAAAAAAAAAAAAAAAA",
  "to_owner": "usr_BBBBBBBBBBBBBBBBBBBBBBBBBB",
  "scopes": [
    "agent"
  ],
  "status": "pending",
  "requested_at": "2026-11-11T00:00:00Z",
  "expires_at": "2026-11-11T01:00:00Z",
  "duration_seconds": 3600
}
Rejected: example
{}

Validate

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