OpenreKeyRotateRequest openre.key-rotate-request@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-request.v1.json
openre.key-rotate-request@1: the body of POST /api/v1/streams/:id/keys/rotate on OpenRe.Stream (openre.key.rotate). grace_seconds (0 by default, at most 7 days) keeps the old key working that long; end_sessions true also ends the stream's open sessions. An empty body rotates with no grace.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
grace_seconds | integer | string | Clamped to 0..604800. |
| |
end_sessions | boolean |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: grace
{
"grace_seconds": 3600,
"end_sessions": false
}Rejected: end-not-boolean
{
"end_sessions": "yes"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('openre.key-rotate-request@1', value); // { valid, errors: [{ path, message }] }