MediaObject media.object@1
Generated at from
openvibe-contracts v0.76.0 and
openvibe-sdk v0.20.1.
- Version
- 1.0.0
- Owner
- media
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/media/object.v1.json
media.object@1: one object of the OpenVibe.Media object API v2 (/api/v2/:app/objects; Media server/objects/model.js objectPublic): its id and legacy ref, tenant and namespace (the tenant's root, or a namespace below it), kind, owner, visibility, lifecycle, type, size and hash, readiness, and where it is served. Copies are described by provider and state, never by path or key. More fields may be added.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes |
| |
media_ref | media.media-ref | |||
legacy_ref | string | null | legacy:<app>:<kind>:<id> for an object projected from a VOD, clip, file or paste row; null for a native v2 object. | ||
app_id | string | yes | The tenant: an app id, or prj_<ULID> / prj_<ULID>-sandbox for a developer project. | |
namespace | string | yes | The namespace grants name: the tenant's root (its app id; app.<project_id> or app.<project_id>.sandbox for a developer project) or a namespace below it (<root>.<segment>…). |
|
kind | enum | yes |
| |
owner | object | |||
owner.subject | string | null | |||
owner.app | string | null | |||
owner.user_id | integer | null | |||
visibility | enum | yes |
| |
lifecycle_status | enum | yes |
| |
mime_type | string | null | |||
size_bytes | integer | yes |
| |
content_hash | string | null | sha256 hex of the bytes, once known. | ||
metadata | object | |||
held | boolean | Under a retention hold (its own, or a clip's source VOD's). | ||
readiness | object | |||
readiness.metadata | boolean | |||
readiness.bytes_verified | boolean | |||
readiness.playable | boolean | |||
readiness.reason | string | null | |||
public_url | string | null | Where a public or unlisted ready object is served; null for private and sandbox objects (download signs them). | ||
sandbox | const |
| ||
locations | array of object | |||
locations[].provider | enum | yes |
| |
locations[].storage_class | string | null | |||
locations[].state | enum | yes |
| |
locations[].size_bytes | integer | null | |||
locations[].verified_at | string | null | |||
locations[].canonical | boolean | |||
created_at | string | yes | ||
updated_at | string | null | |||
deleted_at | string | null |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: native-in-child-namespace
{
"id": "med_01K5WZX7S7Q4D2B8N3M6V1C9TZ",
"media_ref": {
"media_id": "med_01K5WZX7S7Q4D2B8N3M6V1C9TZ"
},
"legacy_ref": null,
"app_id": "prj_01K5WZX7S7Q4D2B8N3M6V1C9TA",
"namespace": "app.prj_01K5WZX7S7Q4D2B8N3M6V1C9TA.avatars",
"kind": "file",
"owner": {
"subject": null,
"app": "prj_01K5WZX7S7Q4D2B8N3M6V1C9TA",
"user_id": null
},
"visibility": "private",
"lifecycle_status": "ready",
"mime_type": "image/png",
"size_bytes": 48213,
"content_hash": "3f1c0b8e2a9d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b",
"metadata": {
"filename": "a.png"
},
"held": false,
"readiness": {
"metadata": true,
"bytes_verified": true,
"playable": false,
"reason": "not_playback_kind"
},
"public_url": null,
"created_at": "2026-09-26 08:00:00",
"updated_at": "2026-09-26 08:00:01",
"deleted_at": null,
"locations": [
{
"provider": "local",
"storage_class": "hot",
"state": "present",
"size_bytes": 48213,
"verified_at": "2026-09-26 08:00:01",
"canonical": true
}
]
}Valid: projected-vod
{
"id": "med_01K5WZX7S7Q4D2B8N3M6V1C9TB",
"legacy_ref": "legacy:live:vod:1277",
"app_id": "live",
"namespace": "live",
"kind": "vod",
"visibility": "public",
"lifecycle_status": "ready",
"size_bytes": 1073741824,
"public_url": "https://openvibe.media/v/1277",
"created_at": "2026-09-01 12:00:00"
}Rejected: no-namespace
{
"id": "med_01K5WZX7S7Q4D2B8N3M6V1C9TB",
"app_id": "live",
"kind": "vod",
"visibility": "public",
"lifecycle_status": "ready",
"size_bytes": 10,
"created_at": "2026-09-01 12:00:00"
}Rejected: unknown-lifecycle
{
"id": "med_01K5WZX7S7Q4D2B8N3M6V1C9TB",
"app_id": "live",
"namespace": "live",
"kind": "vod",
"visibility": "public",
"lifecycle_status": "expired",
"size_bytes": 10,
"created_at": "2026-09-01 12:00:00"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('media.object@1', value); // { valid, errors: [{ path, message }] }