Events

Ingest events

Ingests an event or batch of events following the CloudEvents specification.

post/api/v1/events

Request

  • Base URL
    https://openmeter.cloud (the document declares no server; this is the origin it was published from)
  • Auth
    • HTTP bearer
    • or API key in cookie __session

Request body

dataobject nullable

The event payload. Optional, if present it must be a JSON object.

datacontenttype'application/json' nullable

Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP.

dataschemastring uri nullable

Identifies the schema that data adheres to.

idstring required

Identifies the event.

sourcestring uri-reference required

Identifies the context in which an event happened.

specversionstring required

The version of the CloudEvents specification which the event uses.

subjectstring required

Describes the subject of the event in the context of the event producer (identified by source).

timestring date-time nullable

Timestamp of when the occurrence happened. Must adhere to RFC 3339.

typestring required

Contains a value describing the type of event related to the originating occurrence.

Example request

{
  "id": "5c10fade-1c9e-4d6c-8275-c52c36731d3c",
  "source": "service-name",
  "specversion": "1.0",
  "subject": "customer-id",
  "time": "2023-01-01T01:01:01.001Z",
  "type": "prompt"
}

Response

There is no content to send for this request, but the headers may be useful.

Changes

No recorded changes to this operation across all 2 revisions of this API.