LineageResolveRequest lineage.resolve-request@1

Generated at from openvibe-contracts v0.33.0 and openvibe-sdk v0.5.0.

Version
1.0.0
Owner
live
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/lineage/resolve-request.v1.json

What a caller knows about a channel, stream, VOD, clip or Media object, sent to the canonical channel/owner resolver (roadmap §15.10, requirement D20): the body of POST /internal/lineage/resolve on OpenVibe.Live (capability live.lineage.resolve). GET takes the same fields as query parameters, with legacy_ids flattened to live_user_id and network_user_id. The answer is lineage.resolution@1, whose description has the precedence rules. Every input given is checked, not only the first. display_name is never a resolution input: a request that carries only a display name resolves nothing (reason display_name_only), and next to other inputs it is ignored.

Fields

FieldTypeRequiredDescriptionConstraints
slugstringChannel slug (Live: the username, as in /@<username>; the @ is optional), or a nested <channel>/<slot> naming a stream slot inside the channel by its slug or id. With parent_slug, a plain slug names the slot inside that parent.
  • pattern ^@?[A-Za-z0-9_][A-Za-z0-9_.-]{0,63}(/[A-Za-z0-9_][A-Za-z0-9_.-]{0,63})?$
parent_slugstringThe channel slug when slug names a slot inside it ({ parent_slug: 'alice', slug: 'garage' } is 'alice/garage'). Alone, it names the channel.
  • pattern ^@?[A-Za-z0-9_][A-Za-z0-9_.-]{0,63}$
channel_idstringThe channel's id at its owner (Live: channels.id).
  • pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$
stream_idstringA broadcast session (Live: streams.id).
  • pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$
slot_idstringA persistent stream slot (Live: managed_streams.id; OpenRe stream definitions refer to it as live:managed_stream:<id>).
  • pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$
vod_idstringA VOD (the Media v1 VOD id, the same id Live's VODs had before the Media split).
  • pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$
clip_idstringA clip (the Media v1 clip id). A clip belongs to the clipped channel, never to the person who clipped it.
  • pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$
media_object_idstringA Media object: med_<ULID>, or a legacy:<app>:<kind>:<id> reference (the media_id forms of media.media-ref@1).
  • pattern ^(med_[0-9A-HJKMNP-TV-Z]{26}|legacy:[a-z][a-z0-9-]{1,39}:(vod|clip|file|paste|thumbnail|avatar):[A-Za-z0-9._/-]{1,200})$
owner_subjectstringThe canonical subject that owns the channel (identity.subject-ref@1 user id).
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
legacy_idsobjectPre-subject ids of the channel owner. Resolving through them is confidence legacy_map.
  • no other fields
legacy_ids.live_user_idintegerLive's local user id (users.id).
  • minimum 1
legacy_ids.network_user_idintegerOpenVibe.Network's integer user id, mapped to a Live account by the account link.
  • minimum 1
display_namestringA label the caller holds. Accepted so the answer can say display_name_only; never used to resolve anything, because a display name is not an identity and is never sufficient to establish ownership.
  • maxLength 200

Examples

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

Valid: clip-on-channel-page
{
  "slug": "alice",
  "clip_id": "7"
}
Valid: display-name-only
{
  "display_name": "Alice ✨"
}
Valid: every-input
{
  "slug": "alice",
  "channel_id": "12",
  "stream_id": "9",
  "slot_id": "3",
  "vod_id": "42",
  "clip_id": "7",
  "media_object_id": "med_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "owner_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "legacy_ids": {
    "live_user_id": 17,
    "network_user_id": 57
  },
  "display_name": "Alice"
}
Valid: legacy-media-ref
{
  "media_object_id": "legacy:live:vod:42"
}
Valid: nested-slug
{
  "slug": "alice/garage-cam"
}
Valid: parent-slug
{
  "parent_slug": "alice",
  "slug": "garage-cam"
}
Valid: slug
{
  "slug": "@alice"
}
Rejected: display-name-as-slug
{
  "slug": "Alice Smith"
}
Rejected: empty-legacy-ids
{
  "legacy_ids": {}
}
Rejected: empty
{}
Rejected: local-owner-subject
{
  "owner_subject": "42"
}
Rejected: numeric-id
{
  "vod_id": 42
}
Rejected: unknown-input
{
  "channel_name": "Alice"
}

Validate

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