REST API
Any language that can send an HTTP request can read Engeene data. In TypeScript or JavaScript, use the TypeScript Client instead — it does the steps below for you. Every endpoint is described in full in the API Reference.
1. Get a token
Create an API token under Users → Tokens (see Authentication) and send it with every request:
Authorization: Bearer YOUR_TOKEN
2. Discover the schema
curl -H "Authorization: Bearer TOKEN" \
https://{workspace}.{region}.engeene.com/models
The answer lists every model, dataset and property your token may read
(Models Endpoint). Send the ETag back as If-None-Match and you get
304 Not Modified while nothing has changed.
3. Ask for numbers
curl -X POST https://{workspace}.{region}.engeene.com/data/ecommerce/query \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"metrics": [{"property": "orders.revenue", "aggregation": "Sum"}],
"segmentBy": ["customers.country"]
}'
How to read the JSON answer, and every field of the request, is in the Query Endpoint. The request format itself is explained in API Reference.
4. List rows as CSV
curl -X POST https://{workspace}.{region}.engeene.com/data/ecommerce/list \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: text/csv" \
-H "X-Display-Mode: name" \
-d '{
"properties": ["orders.orderId", "orders.revenue", "customers.country"],
"conditions": [{"type": "Time In Range", "property": "orders.orderedAt", "minimum": 1709251200000, "maximum": 1711929600000}],
"sortBy": [{"property": "orders.revenue", "direction": "Descending"}],
"limit": 1000
}'
The answer is plain CSV with readable values, ready for any CSV parser. See the List Endpoint.
Errors
A failed request answers with an HTTP status and a JSON body that says what went wrong. The ones you will meet most:
| Status | What to do |
|---|---|
400 |
Fix the request — the body names the problem, for example an unknown property |
401 |
The token is missing, expired or revoked |
403 |
The token's role lacks a permission, or the model is outside its access |
404 |
Check the model and dataset names |
429 |
Too many requests — wait the Retry-After seconds and try again |
The full list is in the API Reference.
Tips
- Re-ask only when the data changed. Every query and list answer carries
X-Data-Version; keep it beside your stored result and query again when it moves. - Send a dashboard's questions together. The TypeScript client sends up to 32 queries in one request.
- Filter by time in every query that does not need the full history.