Skip to content

Air API

The Air service is the unified HTTP ingestion endpoint. It handles both real-time messaging (messages and events) and telemetry ingestion (logs, metrics, and traces).

Base URL: https://air.nextepoch.cloud

Ingest Data

POST /v1/ingest/{type}

Path Parameters:

ParameterTypeDescription
typestringOne of: messages, events, logs, metrics, traces

Headers:

HeaderRequiredDescription
AuthorizationYesBearer <your-jwt-token>
Content-TypeYesapplication/json

Request Body:

json
{
  "entries": [
    {
      "timestamp": "2025-01-15T10:30:00Z",
      ...
    }
  ]
}

Maximum 1000 entries per request.

Response:

json
{
  "data": {
    "accepted": 5,
    "rejected": 0
  }
}

Entry Schemas

Message Entry

Used for agent-to-agent communication and commands. Delivered in real time to topic subscribers.

FieldTypeRequiredDescription
timestampstring (ISO 8601)YesWhen the message was sent
messagestringYesMessage content
attributesobjectNoArbitrary key-value pairs

Event Entry

Used for discrete occurrences like workflow triggers and state changes. Delivered in real time to topic subscribers.

FieldTypeRequiredDescription
timestampstring (ISO 8601)YesWhen the event occurred
namestringYesEvent name (e.g., workflow_started)
attributesobjectNoArbitrary key-value pairs

Log Entry

Stored durably and queryable via the Insights API.

FieldTypeRequiredDescription
timestampstring (ISO 8601)YesWhen the log was created
levelstringNodebug, info, warn, error, fatal
messagestringYesLog message
attributesobjectNoArbitrary key-value pairs

Metric Entry

Stored durably and queryable via the Insights API.

FieldTypeRequiredDescription
timestampstring (ISO 8601)YesWhen the metric was recorded
namestringYesMetric name (e.g., http_request_duration_ms)
valuenumberYesMetric value
tagsobjectNoKey-value tags for grouping

Trace Entry

Stored durably and queryable via the Insights API.

FieldTypeRequiredDescription
timestampstring (ISO 8601)YesSpan start time
trace_idstringYesTrace identifier
span_idstringYesSpan identifier
parent_span_idstringNoParent span ID
namestringYesOperation name
duration_msnumberYesSpan duration in milliseconds
statusstringNook, error
attributesobjectNoArbitrary key-value pairs

Health Check

GET /health

Response:

json
{
  "status": "ok"
}

NextEpoch Cloud Documentation