EventsPublishRequest events.publish-request@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- events
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/publish-request.v1.json
events.publish-request@1: the body of POST /api/v1/events on OpenVibe.Events (events.event.publish for services, events.app.publish for developer apps): one events.event-envelope@1, or a batch { events: [...] } of 1 to 100 envelopes stored all or nothing. trace_id, priority (important) and visibility (internal) default when left out. source must be the caller and event_type one of its prefixes (an app: app-<ULID> and app.<project_key>.*, actor the app or the user it acts for).
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: batch
{
"events": [
{
"event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"event_type": "media.vod.ready",
"version": 1,
"source": "media",
"actor": {
"type": "service",
"id": "media"
},
"timestamp": "2026-09-22T12:00:00Z",
"priority": "important",
"visibility": "internal",
"subject": {
"type": "vod",
"id": "1203",
"revision": 4
},
"payload": {
"duration": 3600
}
}
]
}Valid: one
{
"event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"event_type": "media.vod.ready",
"version": 1,
"source": "media",
"actor": {
"type": "service",
"id": "media"
},
"timestamp": "2026-09-22T12:00:00Z",
"priority": "important",
"visibility": "internal",
"subject": {
"type": "vod",
"id": "1203",
"revision": 4
},
"payload": {
"duration": 3600
}
}Rejected: empty-batch
{
"events": []
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('events.publish-request@1', value); // { valid, errors: [{ path, message }] }