---
title: "report.metric@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/report.metric"
updated: null
---

# report.metric@1 · OpenVibe.Services

HTML: [report.metric@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/report.metric)

# ReportMetric `report.metric@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: report
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/report/metric.v1.json`](/docs/contracts/report.metric.json)

report.metric@1: one count computed or ingested by Report, with a UTC day or a window. Money values come from Billing's API; Report does not derive them. Mirrors OpenVibe.Report docs/report.metric.v1.json on origin/main.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `metric` | string | yes |  | - `pattern ^[a-z][a-z0-9_]{1,60}$` |
| `scope` | enum | yes |  | - `one of "network", "site", "channel", "stream"` |
| `scope_id` | string | yes |  | - `minLength 1`<br>- `maxLength 200` |
| `day` | string |  |  | - `format date` |
| `window_days` | enum |  |  | - `one of 7, 30, 90` |
| `value` | number | yes |  |  |
| `unit` | enum | yes |  | - `one of "count", "seconds", "minutes", "bits", "cents", "milliseconds", "percent"` |
| `source` | string | yes |  | - `minLength 1`<br>- `maxLength 40` |

## Examples

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

 Valid: day

~~~~
{
  "metric": "pageviews",
  "scope": "site",
  "scope_id": "network",
  "day": "2026-10-28",
  "value": 147,
  "unit": "count",
  "source": "network-stats"
}
~~~~

Valid: window

~~~~
{
  "metric": "watch_minutes",
  "scope": "channel",
  "scope_id": "carol",
  "window_days": 7,
  "value": 312.5,
  "unit": "minutes",
  "source": "live"
}
~~~~

Rejected: both-periods

~~~~
{
  "metric": "pageviews",
  "scope": "network",
  "scope_id": "network",
  "day": "2026-10-28",
  "window_days": 7,
  "value": 147,
  "unit": "count",
  "source": "network-stats"
}
~~~~

## Validate

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