NetworkStatusIncidentRequest network.status-incident-request@1

Generated at from openvibe-contracts v0.76.0 and openvibe-sdk v0.20.1.

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

network.status-incident-request@1 (capability network.status.incident; staff admins or the Host principal). POST /api/v1/status/incidents opens one: { kind, title, severity? (incidents), services, message, starts_at? (default now), ends_at? (a maintenance window's planned end), state? (default investigating, or scheduled for maintenance) }. POST /api/v1/status/incidents/:id/updates adds an update: { state, message, ends_at? }. A resolved incident or a completed window is closed; updates to it are refused.

Fields

This schema has no named fields.

Examples

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

Valid: open
{
  "kind": "incident",
  "title": "Chat is slow",
  "severity": "minor",
  "services": [
    "chat"
  ],
  "message": "Messages arrive late."
}
Valid: update
{
  "state": "resolved",
  "message": "Fixed and monitored for an hour."
}
Rejected: empty
{
  "kind": "incident",
  "title": "x",
  "services": [],
  "message": ""
}
Rejected: rename-on-update
{
  "state": "resolved",
  "message": "ok",
  "title": "renamed"
}

Validate

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