/  Yamcs HTTP API  /  Events  /  Create Event

Create EventΒΆ

Create an event

URI Template

POST /api/archive/{instance}/events
{instance}

Yamcs instance name

Request Body

interface CreateEventRequest {

  // Description of the type of the event. Useful for quick classification or filtering.
  type: string;

  // **Required.** Event message.
  message: string;

  // The severity level of the event. One of ``info``, ``watch``, ``warning``,
  // ``distress``, ``critical`` or ``severe``. Default is ``info``
  severity: string;

  // Time associated with the event.
  // If unspecified, this will default to the current mission time.
  time: string;  // RFC 3339 timestamp

  // Source of the event. Useful for grouping events in the archive. Default is
  // ``User``.
  source: string;

  // Sequence number of this event. This is primarily used to determine unicity of
  // events coming from the same source. If not set Yamcs will automatically
  // assign a sequential number as if every submitted event is unique.
  sequenceNumber: number;

  // Additional properties
  extra: {[key: string]: string};
}

Response Type

interface Event {
  source: string;
  generationTime: string;  // RFC 3339 timestamp
  receptionTime: string;  // RFC 3339 timestamp
  seqNumber: number;
  type: string;
  message: string;
  severity: EventSeverity;

  // Set by API when event was posted by a user
  createdBy: string;

  // Additional properties
  extra: {[key: string]: string};
}

Related Types

enum EventSeverity {
  INFO = "INFO",
  WARNING = "WARNING",

  // Legacy, avoid use.
  ERROR = "ERROR",
  WATCH = "WATCH",

  // Placeholder for future WARNING constant.
  // (correctly sorted between WATCH and DISTRESS)
  //
  // Most clients can ignore, this state is here
  // to give Protobuf clients (Python Client, Yamcs Studio)
  // the time to add a migration for supporting both WARNING
  // and WARNING_NEW (Protobuf serializes the number).
  //
  // Then in a later phase, we move from:
  // WARNING=1, WARNING_NEW=4
  //
  // To:
  // WARNING_OLD=1, WARNING=4
  //
  // (which is a transparent change to JSON clients)
  WARNING_NEW = "WARNING_NEW",
  DISTRESS = "DISTRESS",
  CRITICAL = "CRITICAL",
  SEVERE = "SEVERE",
}