Until now, a program that wanted numbers from eMondrian had to speak XMLA: SOAP envelopes, XML answers, a client library that exists for few languages. Excel and Power BI do this for you. A Python script, a Node backend or an n8n workflow don't.
From Community 2026.11.20 eMondrian also answers over REST with JSON. Send an MDX or DAX query in a POST request and get rows back:
curl -H 'Content-Type: application/json' https://demo.emondrian.com/api/v1/query -d '{
"catalog": "OnTime",
"query": "SELECT {[Measures].[Flights], [Measures].[Avg Arr Delay]} ON 0, TopCount([Airline].[Airline].Members, 5, [Measures].[Flights]) ON 1 FROM [OnTime (attributes)] WHERE [Time].[2024]"
}'
{
"columns": [
{ "name": "Airline", "kind": "member", "type": "string" },
{ "name": "Flights", "kind": "measure", "type": "number" },
{ "name": "Avg Arr Delay", "kind": "measure", "type": "number" }
],
"rows": [
{ "Airline": "WN", "Flights": 1419419, "Avg Arr Delay": 12.13 },
{ "Airline": "DL", "Flights": 1009174, "Avg Arr Delay": 13.19 },
{ "Airline": "AA", "Flights": 984306, "Avg Arr Delay": 23.01 },
{ "Airline": "UA", "Flights": 760451, "Avg Arr Delay": 15.07 },
{ "Airline": "OO", "Flights": 744658, "Avg Arr Delay": 15.96 }
],
"rowCount": 5,
"truncated": false,
"elapsedMs": 168
}
You can run this request yourself: it goes to our public demo, 182 million US flights in ClickHouse, open without sign-in. The answer took 168 ms.
What the API does
| Request | Answer |
|---|---|
GET /api/v1/catalogs |
The catalogs, each with the cubes you may see |
GET /api/v1/catalogs/{catalog}/cubes/{cube} |
Dimensions, hierarchies, levels and measures |
POST /api/v1/query |
The result of an MDX or DAX query, as a table |
GET /api/v1/openapi.json |
The OpenAPI 3 description |
- Read-only. It runs queries. It doesn't change models or write data back.
- MDX and DAX. A DAX query comes back as the table it defines.
- No licence key for the API itself. DAX queries need the DAX module, as everywhere.
- The same security as XMLA. The same users, passwords and tokens, sent in the header, and every query runs with the caller's roles.
The full reference: REST API (JSON).
Why it matters: the model is now for every system
A semantic model defines your numbers once: what Revenue is, how Margin is calculated, which rows each customer may see. Excel, Power BI and AI agents already use it. Now everything else can, too, and gets the same numbers.
Here is what that opens up.
1. Your own HTML dashboard on governed data
With an AI agent anyone can build a dashboard page in their own design in minutes. The hard part is the data behind it: the agent writes the numbers into the file, or the page gets a database password.
With the REST API, the page's backend asks eMondrian for the data at each view:
// server side: the token stays on your server
const res = await fetch("https://bi.example.com/api/v1/query", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.EMONDRIAN_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
catalog: "FoodMart",
query: "SELECT {[Measures].[Unit Sales]} ON 0, NON EMPTY [Store].[Store State].Members ON 1 FROM [Sales]"
})
});
const { rows } = await res.json();
The data is live, the file holds no numbers, and the database password stays in eMondrian. The measures are the model's: Unit Sales on the page is the same number as in Excel.
2. A customer portal where each customer sees only their rows
Give each customer an eMondrian user and a role. An administrator issues that user's personal token, on the page /account/tokens?user=acme-portal or from a script:
curl -u admin -H 'Content-Type: application/json' https://bi.example.com/account/api/tokens \
-d '{"user": "acme-portal", "name": "Acme portal backend", "days": 90}'
The answer shows the token once. Your backend keeps it and calls the API with it, and the server filters the rows:
"rows": [ { "Store State": "OR", "Unit Sales": 67659 } ]
Same query, same code. With an administrator's token the answer has three states; with Acme's token, only Oregon. With rollupPolicy="partial" on the role's grant, totals count only the rows the role allows. The filter is not in your JavaScript, so nobody can remove it in the browser.
A user has one personal token, so give the portal a user of its own: revoking its token stops nothing else. To take access away, revoke the token or disable the user: the token stops working within 30 seconds.
3. Scripts and notebooks
A data scientist doesn't need an XMLA library to get the official numbers:
import os, requests, pandas as pd
r = requests.post(
"https://bi.example.com/api/v1/query",
headers={"Authorization": f"Bearer {os.environ['EMONDRIAN_TOKEN']}"},
json={"catalog": "FoodMart", "cube": "Sales",
"query": 'EVALUATE SUMMARIZECOLUMNS(Store[Store State], "Unit Sales", [Unit Sales])'},
)
df = pd.DataFrame(r.json()["rows"])
A DAX query names the cube, and its columns are named as in the query: Store[Store State] and [Unit Sales]. The forecast in the notebook starts from the same Unit Sales as the board report.
4. Low-code tools and automations
n8n, Make, Retool, Zapier, a Power Automate flow: any tool that can send an HTTP request and read JSON can now query the model. A few ideas:
- A morning KPI message in Slack or Teams: yesterday's sales against the same day last year.
- An alert when a measure crosses a threshold: late deliveries above 5%, stock below a minimum.
- An internal tool in Retool on the same measures as Power BI.
5. Exports to other systems
A scheduled job reads aggregates from the model and writes them where they are needed: a CRM field with each account's revenue, a planning sheet, a partner's file. The numbers in the export are the model's, not another SQL query that someone wrote once and nobody checks.
By default a request returns up to 10,000 rows; it can ask for up to 100,000 with maxRows. Both limits are server settings, and truncated says when rows were left out.
6. Services that AI agents write for you
An agent that writes code reads /api/v1/openapi.json, signed in with the service's credentials, and knows the whole API. It reads the cube's model from /api/v1/catalogs/{catalog}/cubes/{cube} and writes queries in business names: Unit Sales, Store State, not tables and joins. The service it writes runs as a user with a role, so it sees only what that user may see.
Security: the same as XMLA
| Sign-in | How |
|---|---|
| User name and password | HTTP Basic |
Personal token (emk_…) |
Authorization: Bearer emk_… |
| OAuth access token | Authorization: Bearer <token> |
- A token goes in the header, where proxies and browser histories don't keep it. A token in the address is refused.
- Every query runs with the caller's roles: row-level security, hidden measures, hidden cubes.
- Every request through the gateway is a line in its access log, with the user and the sign-in method.
- Pages on other sites can't call the API from a browser unless you list them in
auth/identity.yml. A token in a web page can be read by anyone who opens it, so call eMondrian from your server where you can.
Try it
- Run the
curlrequest above against the demo, or openhttps://demo.emondrian.com/api/v1/catalogsin a browser. - On your own server: update to Community
2026.11.20.2or later. The API is on athttps://<your server>/api/v1. - Create a personal token at
/account/tokens, or have an administrator issue one for a program's own user, and call the API with it.
Read more: REST API (JSON) · Security · AI agents (MCP)
First published on docs.emondrian.com.
Top comments (0)