NetworkProjectReadResult network.project-read-result@1

Generated at from openvibe-contracts v0.97.0 and openvibe-sdk v0.26.0.

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Decision
ADR-014
Schema
https://openvibe.network/contracts/network/project-read-result.v1.json

network.project-read-result@1: the service-facing answer from OpenVibe.Network GET /internal/projects/:project_id (network.project.read). It carries project tenancy, allowances, quotas, apps and each app's grants (requested, approved, denied or revoked) without credentials or member identities beyond the owner.

Fields

FieldTypeRequiredDescriptionConstraints
projectobjectyes
  • no other fields
project.idstringyes
  • pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$
project.namestringyes
project.ownerobjectyes
  • no other fields
project.owner.typeconstyes
  • = "user"
project.owner.idstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
project.environment_policystringyes
project.home_cellstring | nullyes
project.residencystring | nullyes
project.preferred_regionsarray of stringyes
project.archived_atstring | nullyes
project.created_atstringyes
allowancearray of stringyes
quotasarray of objectyes
  • items: no other fields
quotas[].capabilitystringyes
quotas[].limitnumberyes
  • minimum 0
quotas[].windowstringyes
quotas[].unitstringyes
quotas[].enforced_bystring | nullyes
appsarray of objectyes
  • items: no other fields
apps[].idstringyes
  • pattern ^app_[0-9A-HJKMNP-TV-Z]{26}$
apps[].namestringyes
apps[].environmentstringyes
apps[].statusenumyes
  • one of "active", "revoked"
apps[].created_atstringyes
apps[].revoked_atstring | nullyes
grantsarray of objectyes
  • items: no other fields
grants[].app_idstringyes
  • pattern ^app_[0-9A-HJKMNP-TV-Z]{26}$
grants[].capabilitystringyes
grants[].audiencestringyes
grants[].statusenumyes
  • one of "requested", "approved", "denied", "revoked"
grants[].decided_atstring | nullyes

Examples

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

Valid: project
{
  "project": {
    "id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "name": "Example",
    "owner": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    },
    "environment_policy": "production",
    "home_cell": null,
    "residency": null,
    "preferred_regions": [],
    "archived_at": null,
    "created_at": "2026-10-03T00:00:00Z"
  },
  "allowance": [],
  "quotas": [],
  "apps": [],
  "grants": []
}
Valid: tenancy-with-apps-and-grants
{
  "project": {
    "id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "name": "Tenancy",
    "owner": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    },
    "environment_policy": "sandbox",
    "home_cell": "cel_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "residency": "eu-west",
    "preferred_regions": [],
    "created_at": "2026-10-03T00:00:00Z",
    "archived_at": null
  },
  "allowance": [
    "media.object.read",
    "media.object.upload"
  ],
  "quotas": [
    {
      "capability": "media.object.upload",
      "limit": 1073741824,
      "window": "total",
      "unit": "bytes",
      "enforced_by": "openvibe.media"
    }
  ],
  "apps": [
    {
      "id": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "name": "Uploader",
      "environment": "sandbox",
      "status": "active",
      "created_at": "2026-10-03T00:00:00Z",
      "revoked_at": null
    },
    {
      "id": "app_01JAB2C3D4E5F6G7H8J9K0MPRQ",
      "name": "Reader",
      "environment": "sandbox",
      "status": "revoked",
      "created_at": "2026-10-03T00:00:00Z",
      "revoked_at": "2026-10-03T01:00:00Z"
    }
  ],
  "grants": [
    {
      "app_id": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "capability": "media.object.upload",
      "audience": "openvibe.media",
      "status": "approved",
      "decided_at": "2026-10-03T00:30:00Z"
    },
    {
      "app_id": "app_01JAB2C3D4E5F6G7H8J9K0MPRQ",
      "capability": "media.object.read",
      "audience": "openvibe.media",
      "status": "revoked",
      "decided_at": "2026-10-03T01:00:00Z"
    }
  ]
}
Rejected: secret
{
  "project": {
    "id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "name": "Example",
    "owner": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    },
    "environment_policy": "production",
    "home_cell": null,
    "residency": null,
    "preferred_regions": [],
    "archived_at": null,
    "created_at": "2026-10-03T00:00:00Z"
  },
  "allowance": [],
  "quotas": [],
  "apps": [
    {
      "id": "app_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "name": "App",
      "environment": "production",
      "status": "active",
      "created_at": "2026-10-03T00:00:00Z",
      "revoked_at": null,
      "client_secret": "must never be exposed"
    }
  ],
  "grants": []
}

Validate

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