NetworkAccountExport network.account-export@1

Generated at from openvibe-contracts v0.76.0 and openvibe-sdk v0.20.1.

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Decision
ADR-033
Schema
https://openvibe.network/contracts/network/account-export.v1.json

network.account-export@1 (OpenVibe.Network; roadmap WS-B task 7, ADR-033): a person's data export job. POST /api/v1/account/export starts one (one open at a time, one a day) and GET /api/v1/account/export/{id} answers its state. When ready or partial, GET /api/v1/account/export/{id}/download serves the zip to the same person until expires_at.

Fields

FieldTypeRequiredDescriptionConstraints
export_idstringyes
  • pattern ^exp_[0-9A-HJKMNP-TV-Z]{26}$
statusenumyespending: waiting for the services' parts. ready: every expected service answered. partial: the deadline passed without some (services[].status missing). expired: the archive is gone (7 days). failed: the archive could not be built.
  • one of "pending", "ready", "partial", "expired", "failed"
requested_atstringyes
  • format date-time
deadlinestringyes
  • format date-time
ready_atstringWhen the archive was built.
  • format date-time
expires_atstringThe archive is deleted then (7 days after ready_at).
  • format date-time
size_bytesinteger
  • minimum 0
servicesarray of objectyes
  • maxItems 64
  • items: no other fields
services[].servicestringyes
  • pattern ^[a-z][a-z0-9-]{1,31}$
services[].statusenumyes
  • one of "received", "waiting", "missing"
services[].filesinteger
  • minimum 0
services[].bytesinteger
  • minimum 0

Examples

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

Valid: partial
{
  "export_id": "exp_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "status": "partial",
  "requested_at": "2026-09-27T21:00:00.000Z",
  "deadline": "2026-09-27T21:30:00.000Z",
  "ready_at": "2026-09-27T21:30:02.000Z",
  "expires_at": "2026-10-04T21:30:02.000Z",
  "size_bytes": 48213,
  "services": [
    {
      "service": "network",
      "status": "received",
      "files": 9,
      "bytes": 30100
    },
    {
      "service": "live",
      "status": "received",
      "files": 6,
      "bytes": 18113
    },
    {
      "service": "games",
      "status": "missing"
    }
  ]
}
Rejected: unknown-status
{
  "export_id": "exp_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "status": "done",
  "requested_at": "2026-09-27T21:00:00.000Z",
  "deadline": "2026-09-27T21:30:00.000Z",
  "services": []
}

Validate

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