OpenreKeyRotateResult openre.key-rotate-result@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
openre
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/openre/key-rotate-result.v1.json

openre.key-rotate-result@1: the answer of POST /api/v1/streams/:id/keys/rotate on OpenRe.Stream: the new key (shown once, Cache-Control no-store), the keys it retired (grace or revoked), when the grace ends, how many sessions were asked to end, and the ingest endpoints. openre.key.rotated is announced.

Fields

FieldTypeRequiredDescriptionConstraints
keyobjectyes
key.idstringyes
key.keystringyesThe plain ingest key: only in this answer.
key.hintstringyes
key.shown_onceconstyes
  • = true
retiredarray of objectyes
retired[].idstringyes
retired[].hintstring
retired[].statusenumyes
  • one of "grace", "revoked"
grace_untilstring | nullyes
  • format date-time
sessions_endingintegeryes
  • minimum 0
ingestobjectyesWhere an encoder publishes (never the key).
ingest.rtmpobject
ingest.rtmp.urlstringyes
ingest.rtmp.key_hintstring | null
ingest.rtmp.key_idstring | null

Examples

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

Valid: grace
{
  "key": {
    "id": "key_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "key": "ovk_live_Zp41mm80",
    "hint": "mm80",
    "shown_once": true
  },
  "retired": [
    {
      "id": "key_01JAB2C3D4E5F6G7H8J9K0MNPR",
      "hint": "x9Q2",
      "status": "grace"
    }
  ],
  "grace_until": "2026-09-25T19:00:00.000Z",
  "sessions_ending": 0,
  "ingest": {
    "rtmp": {
      "url": "rtmp://ingest.openre.stream/live",
      "key_hint": "mm80",
      "key_id": "key_01JAB2C3D4E5F6G7H8J9K0MNPS"
    }
  }
}
Rejected: not-shown-once
{
  "key": {
    "id": "key_1",
    "key": "x",
    "hint": "x",
    "shown_once": false
  },
  "retired": [],
  "grace_until": null,
  "sessions_ending": 0,
  "ingest": {}
}

Validate

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