Documentation
Queries, sharing and export
8. Queries
Queries are written in AQL (Analytical Query Language), which works on top of the semantic model. You refer to model objects in square brackets, and the engine resolves joins and aggregation for you.
SUM([amount]) DICE [region]
1. Submit the query
HTTP
POST /api/v1/projects/{project}/app/aql/execute
Content-Type: application/json
{ "aql": "SUM([amount]) DICE [region]" }The response contains two links: rel: "scache.created" (the computation job) and rel: "data.created" (the result).
2. Wait for the computation. Poll the scache.created link until status is OK.
3. Fetch the result. GET the data.created link:
JSON
{ "data": { "values": "East\t125000\nWest\t98000\n", "visual": { "column": [ { "title": "Region" }, { "title": "Amount" } ] } } }Add ?format=text/csv, or send Accept: text/csv, to download the result as a file.
Results are cached. Repeating a query on unchanged data returns immediately. Every query runs with the calling user's permissions and row-level filters.
9. Sharing and export
Dashboard sharing
| Method | Path | Description |
|---|---|---|
| GET | /projects/{project}/pmd/share | List shared dashboards |
| POST | /projects/{project}/pmd/share | Share a dashboard |
| GET / PUT / DELETE | /projects/{project}/pmd/share/{dashboardId} | Read, change or stop a share |
| POST | /projects/{project}/app/obj/batch | Set one role's access on many objects at once |
HTTP
POST /api/v1/projects/{project}/pmd/share
Content-Type: application/json
{ "type": "private", "object": "sales_overview", "users": ["[email protected]"], "emailNotif": true }type: "public" creates a public (embeddable) share. It requires Admin, and dashboard embedding must be enabled for the project.
PDF export
HTTP
POST /api/v1/projects/{project}/app/export/url
Accept: application/pdf
Content-Type: application/json
{ "url": "https://app.inzata.com/app/{project}/dashboard/sales_overview", "landscape": true, "pageType": "A4" }The response is the PDF file. Use /app/export/html with { "html": "..." } to render your own HTML. Options: landscape, pageType, width, height, margin, scale.
Further reading
Was this helpful?
Contact support