Written for: For developers
Integrate with Astrato
Astrato offers several interfaces for developers. Choose by what you are building, then follow the linked page, which owns the detail.
Choose an interface
Section titled “Choose an interface”| You want to | Use |
|---|---|
| Build an app that Astrato hosts, from your own project | Data App quickstart, the CLI and the App runtime |
| Add governed charts to a site or product that you host | Externally hosted app quickstart and the SDK |
| Query governed data or call writeback from your own code | SDK and Writeback and SQL |
| Render Astrato charts yourself | Visualizations reference |
| Let an AI assistant read your semantic layer or edit it | Connect an AI assistant, MCP setup and skills |
| Run governed business questions from an assistant or script | Business questions |
| Embed a dashboard in your own web page | Embed an Astrato dashboard in your web app |
| Publish and manage an app | App publications |
| Call Astrato’s HTTP API directly | HTTP API |
If you are not sure whether the app should be hosted by Astrato or by you, read Getting started with Data Apps first.
Authentication
Section titled “Authentication”How you sign in depends on where the code runs: an externally hosted app, a Data App, an MCP client, a script or a browser session. Authentication compares them and is the single page to follow. MCP clients use Astrato OAuth or a Personal Access Token, and the scopes you grant limit what the client can do. See MCP scopes and permissions.
Security
Section titled “Security”- MCP tools run as the authenticated Astrato user, so a client can do only what that user can do.
- Grant an MCP client or token only the scopes the task needs. See MCP scopes and permissions.
- To embed a dashboard in your own site, see Embed a dashboard. To review embedded workbook content, see Embed links. To allow external content to load inside Astrato frames, see Content security policy.
- Publishing is explicit. Saving source or completing a build does not publish an app. See App publications.
HTTP API
Section titled “HTTP API”Astrato publishes no complete reference for a REST API. These pages document five HTTP routes for data and MCP, and Managing Users and Groups with Astrato API documents the user and group routes. Auth: OEM API (Web Ticket Authentication) documents the OEM web ticket requests. For most other tasks, use the MCP endpoint, the CLI or the SDK.
| Route | What it does | Reference |
|---|---|---|
POST https://app.astrato.io/mcp |
Calls any MCP tool, as JSON-RPC | MCP setup and the MCP tool reference |
POST /api/message/tenants/{tenantId}/data/execute/query |
Runs a governed query | SDK queries |
POST /api/message/tenants/{tenantId}/data/writeback |
Inserts or updates warehouse rows | Writeback and SQL |
POST /api/message/tenants/{tenantId}/data/execute/procedure |
Runs a stored procedure | Writeback and SQL |
POST /api/message/tenants/{tenantId}/data/execute/sql |
Reads data with SQL SELECT |
Writeback and SQL |
The MCP endpoint is the one with a published argument contract: every tool’s arguments, types, allowed values and limits are in the MCP tool reference. A script can call it with a personal access token; see Authentication.
The query route in the table, POST /api/message/tenants/{tenantId}/data/execute/query, is also
what a workbook chart calls, so the request it sends can be replayed from a script: send a personal
access token as an Authorization: Bearer header and the chart’s engine query as the JSON body. To
see that body, open the browser’s developer tools on the chart, filter the Network tab for the
request named query, and copy its payload. The response is the
engine result unchanged: response.fields lists the columns, response.data holds the rows keyed
by row index, and other properties such as telemetry can sit beside response; see
The engine response. The body a chart sends is not a
documented contract and can change with the product, so build the query yourself with the
SDK, or with astrato_data_prepare_query and astrato_data_execute_query over
MCP as Query governed data with MCP shows.
To do one of these tasks without a REST endpoint, use:
| You want to | Use |
|---|---|
| Run a stored business question | astrato_semantic_layer_execute_question over MCP. See Business questions. |
| Query governed data | The SDK, or astrato_data_prepare_query and astrato_data_execute_query over MCP. See Query governed data with MCP. |
| Read or change a semantic layer | The semantic layer tools over MCP. See Tools. |
| Share a semantic layer with everyone | astrato semantic-layers visibility in the CLI, or astrato_semantic_layer_set_visibility over MCP. |
| Publish, update, unpublish or delete a Data App | astrato publish and astrato publications in the CLI, or the Data App tools over MCP. See Manage Data Apps. |
| Grant or revoke access to a Data App | astrato_management_access_grant and astrato_management_access_revoke over MCP. The CLI cannot change access. See Direct access. |
| List users, or change a user’s role, sign-in or team | astrato_management_directory_list_users and astrato_management_directory_update_user over MCP. See MCP administration and limits. |
| Create, rename or delete a group, or add members | Administration → Groups, or the group requests in Managing Users and Groups with Astrato API. No MCP tool or CLI command manages groups. See Manage groups and assignment rules. |
| Create a data connection or import a CSV | The data connection and import tools over MCP. See Create connections and import CSVs over MCP. |
| Sign your own users in to embedded content | The OEM web ticket flow. See Embed a dashboard. |
Two articles from the earlier Help Center describe other direct HTTP requests:
| Article | Covers |
|---|---|
| Auth: OEM API (Web Ticket Authentication) | Signing your own users in with web tickets, and ending their sessions |
| Managing Users and Groups with Astrato API | Listing users and groups, creating, changing and deleting groups, and managing members |
The OEM management API is current. You enable it in System settings, and Embed a dashboard walks the flow. Web tickets authenticate with the OEM client ID and secret, from your server only. The users-and-groups requests send a personal access token as a bearer token; see Authentication for how to create and store one.
Reference
Section titled “Reference”- Astrato CLI
- MCP tool reference
- Data App runtime
- SDK
- Semantic layer entity model
- Business question YAML
- Visualizations
For AI agents choosing pages, see reading guidance.