Observability API

Observability Endpoints

Schemas

/schemas

Purpose

  • There are no limits on the number of event types or on how complex the structure may be.
  • Define the structure of events that a tenant wants to record.

Use Cases

  • Defining mood events
  • Configuring analytics for SEL assessments
  • Creating usage/navigation tracking schemas
  • Defining custom KPIs for content or curriculum

GET /schemas

curl -X 'GET' \
  'http://observability.blueprinteq.ai/schemas' \
  -H 'accept: application/json' \
  -H 'X-Api-Key: 123'

GET /schemas/{id}

curl -X 'GET' \
  'http://observability.blueprinteq.ai/schemas/1' \
  -H 'accept: application/json' \
  -H 'X-Api-Key: 223'

POST /schemas

curl -X 'POST' \
  'https://observability.blueprinteq.ai/schemas' \
  -H 'accept: application/json' \
  -H 'X-Api-Key: 1233' \
  -H 'Content-Type: application/json' \
  -d '{
  "_id": "string",
  "available": true,
  "created_at": "string",
  "created_by": "string",
  "event": "string",
  "json": {
    "additionalProp1": {}
  },
  "updated_at": "string",
  "version": 0
}'

/schema-version

Purpose

  • Allows tenants to evolve their schema over time by creating versioned updates.
  • Add or remove fields
  • Rename fields
  • Change data types
  • Extend analytics model
  • When a schema is updated, an ETL migration runs automatically to ensure that historical data remains consistent.

Audit Log

  • Every schema change is tracked for compliance and debugging.

Events

/events

Purpose

Record a single event based on the tenant’s defined schema.

This could be:

  • A mood check-in
  • A risk analysis result
  • A video play
  • A lesson completion
  • A navigation event
  • Custom engagement actions

Features

  • Real-time ingestion
  • Automatic validation against the schema
  • Instant availability for analytics and BigQuery

POST /events

curl -X 'POST' \
  'https://observability.blueprinteq.ai/events' \
  -H 'accept: application/json' \
  -H 'X-Api-Key: 1233' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "evt_123",
  "name": "invoice.created",
  "payload": {},
  "tenant_id": "acct_456",
  "timestamp": "2024-01-15T12:34:56Z"
}'

/events/query

Purpose

Run powerful, raw SQL queries directly against the tenant’s dataset using BigQuery.


Use Cases

  • Dashboard metrics
  • SEL distribution analysis
  • Mood trend visualization
  • Content performance analytics
  • District → school → class → user drilldowns

POST /events/query

curl -X 'POST' \
  'https://observability.blueprinteq.ai/events/query' \
  -H 'accept: application/json' \
  -H 'X-Api-Key: 123' \
  -H 'Content-Type: application/json' \
  -d '{
  "sql": "SELECT * FROM events WHERE tenant_id='\''acct_456'\'' LIMIT 25"
}'

/events/query-csv

curl -X 'POST' \
  'https://observability.blueprinteq.ai/events/query-csv' \
  -H 'accept: application/json' \
  -H 'X-Api-Key: 1233' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "evt_123",
  "name": "invoice.created",
  "payload": {},
  "tenant_id": "acct_456",
  "timestamp": "2024-01-15T12:34:56Z"
}'