---
title: "common.entity-ref@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/common.entity-ref"
updated: null
---

# common.entity-ref@1 · OpenVibe.Services

HTML: [common.entity-ref@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/common.entity-ref)

# EntityRef `common.entity-ref@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

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

Typed reference to another service's entity. Store this instead of a foreign key; resolve a display projection from the owner.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `service` | string | yes |  | - `pattern ^[a-z][a-z0-9-]{1,39}$` |
| `type` | string | yes |  | - `pattern ^[a-z][a-z0-9_]{1,39}$` |
| `id` | string | yes |  | - `minLength 1`<br>- `maxLength 128` |
| `revision` | integer |  |  | - `minimum 0` |
| `label` | string |  | Cached display label. Never authoritative. | - `maxLength 200` |

## Examples

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

 Valid: vod-thread

~~~~
{
  "service": "media",
  "type": "vod",
  "id": "1203",
  "revision": 3,
  "label": "Friday stream"
}
~~~~

Rejected: no-id

~~~~
{
  "service": "media",
  "type": "vod"
}
~~~~

## Validate

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