NetworkCreatorAnalyticsResult network.creator-analytics-result@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-021
Schema
https://openvibe.network/contracts/network/creator-analytics-result.v1.json

network.creator-analytics-result@1 (roadmap WS-E task 6): GET /api/v1/creators/:creator/analytics?days=1-365 on OpenVibe.Network. A creator's streaming analytics, built from live.stream.ended events: per UTC day and per stream, counts only (never who watched or chatted, no IP address or viewer id). Everyone sees streams, minutes and peak viewers; the creator (signed in) and services holding network.analytics.creator.read also get average viewers, chatters, messages and watch minutes (`full: true`).

Fields

FieldTypeRequiredDescriptionConstraints
creatorstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
daysintegeryes
  • minimum 1
  • maximum 365
fullbooleanyes
totalshttps://openvibe.network/contracts/network/creator-analytics-result.v1.json#/$defs/countsyes
dailyarray of objectyes
  • maxItems 365
daily[].daystringyes
  • pattern ^\d{4}-\d{2}-\d{2}$
streamsarray of objectyes
  • maxItems 100
  • items: no other fields
streams[].stream_idintegeryes
  • minimum 1
streams[].titlestring | null
  • maxLength 300
streams[].categorystring | null
  • maxLength 100
streams[].started_atstringyes
  • format date-time
streams[].ended_atstringyes
  • format date-time
streams[].duration_secondsintegeryes
  • minimum 0
streams[].peak_viewersinteger
  • minimum 0
streams[].avg_viewersnumber
  • minimum 0
streams[].unique_chattersinteger
  • minimum 0
streams[].messagesinteger
  • minimum 0
streams[].watch_minutesinteger
  • minimum 0

Examples

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

Valid: public
{
  "creator": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "days": 30,
  "full": false,
  "totals": {
    "streams": 2,
    "stream_seconds": 5400,
    "peak_viewers": 12
  },
  "daily": [
    {
      "day": "2026-09-26",
      "streams": 2,
      "stream_seconds": 5400,
      "peak_viewers": 12
    }
  ],
  "streams": [
    {
      "stream_id": 2483,
      "title": "Night walk",
      "category": null,
      "started_at": "2026-09-26T14:54:43Z",
      "ended_at": "2026-09-26T15:19:08Z",
      "duration_seconds": 1465,
      "peak_viewers": 12
    }
  ]
}
Rejected: viewer-ips
{
  "creator": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "days": 30,
  "full": true,
  "totals": {},
  "daily": [],
  "streams": [
    {
      "stream_id": 1,
      "started_at": "2026-09-26T14:54:43Z",
      "ended_at": "2026-09-26T15:19:08Z",
      "duration_seconds": 1,
      "viewer_ips": [
        "1.2.3.4"
      ]
    }
  ]
}

Validate

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