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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
key | object | yes | ||
key.id | string | yes | ||
key.key | string | yes | The plain ingest key: only in this answer. | |
key.hint | string | yes | ||
key.shown_once | const | yes |
| |
retired | array of object | yes | ||
retired[].id | string | yes | ||
retired[].hint | string | |||
retired[].status | enum | yes |
| |
grace_until | string | null | yes |
| |
sessions_ending | integer | yes |
| |
ingest | object | yes | Where an encoder publishes (never the key). | |
ingest.rtmp | object | |||
ingest.rtmp.url | string | yes | ||
ingest.rtmp.key_hint | string | null | |||
ingest.rtmp.key_id | string | 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 }] }