E EMBAN / Docs

Testing with curl

Test the full Emban flow without writing code.

Setup

export EMBAN_ADMIN_KEY="eb_adm_your_key_here"
export EMBAN_INGEST_KEY="eb_ing_your_key_here" # optional for production-like testing
export EMBAN="https://emban.sidelabs.dev"

For a quick walkthrough you can use EMBAN_ADMIN_KEY everywhere below. For a production-like flow, use EMBAN_INGEST_KEY only for /v1/events and keep EMBAN_ADMIN_KEY for dashboard and embed-session calls.

End-to-end sequence

  1. Ingest: post seeded events for one tenant.
  2. Discover: confirm Emban sees the event names and dimensions you expect.
  3. Surface: auto-create or inspect a dashboard.
  4. Session: mint a tenant-scoped signed embed session.
  5. Validate: open the returned embed_url in a browser or compare it with Live demo.

Send events

curl -X POST $EMBAN/v1/events \
  -H "Authorization: Bearer ${EMBAN_INGEST_KEY:-$EMBAN_ADMIN_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "events": [
    {"tenant_id":"acme","event_name":"api.call","timestamp":"2026-03-29T10:00:00Z",
     "user_id":"u1","string_props":{"model":"gpt-4"},"numeric_props":{"tokens":100}},
    {"tenant_id":"acme","event_name":"api.call","timestamp":"2026-03-29T10:05:00Z",
     "user_id":"u2","string_props":{"model":"claude-3"},"numeric_props":{"tokens":250}},
    {"tenant_id":"acme","event_name":"api.call","timestamp":"2026-03-29T10:10:00Z",
     "user_id":"u1","string_props":{"model":"gpt-4"},"numeric_props":{"tokens":75}}
  ]
}'
# {"accepted":3,"status":"ok"}

Discover events

curl $EMBAN/v1/discover \
  -H "Authorization: Bearer $EMBAN_ADMIN_KEY" | python3 -m json.tool

Auto-create dashboard

curl -X POST $EMBAN/v1/discover/auto-create \
  -H "Authorization: Bearer $EMBAN_ADMIN_KEY" | python3 -m json.tool
# Returns dashboard_id

List dashboards

curl $EMBAN/v1/dashboards \
  -H "Authorization: Bearer $EMBAN_ADMIN_KEY" | python3 -m json.tool

Create embed session

This request needs an admin key. An ingest key is not enough.

curl -X POST $EMBAN/v1/embed-sessions \
  -H "Authorization: Bearer $EMBAN_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "tenant_id": "acme",
  "dashboard_id": "YOUR_DASHBOARD_ID",
  "expires_in": 3600
}' | python3 -m json.tool
# Returns embed_url — open in browser

Query data

curl "$EMBAN/v1/query?event_name=api.call&metric=count&period=7d&tenant_id=acme" \
  -H "Authorization: Bearer $EMBAN_ADMIN_KEY" | python3 -m json.tool
Validation flow: this guide proves the server-side API path. Once curl succeeds, move to Embed Runtime or the Node.js Backend guide to wire the same flow into a trusted app backend.