محتويات الوثائق
BI & Analytics
Read-only analytics over your ERP data — datasets, ad-hoc queries, KPIs, dashboards, reports and exports. Query modelled facts and dimensions, pull KPI values for an external scorecard, or schedule a data export to a warehouse. Every endpoint reads data; none mutates it, so they all require the bi:read scope.
/v1/bi/datasetsScope: bi:readList datasets
Returns a cursor-paginated list of queryable datasets (modelled facts + dimensions). Each dataset exposes the fields you can use as metrics or dimensions.
| limitoptional | integerPage size, 1–200 (default 50). |
| cursoroptional | stringPagination cursor from a previous response. |
| moduleoptional | stringFilter by source module code, e.g. finance, crm. |
curl "https://api.apusplatform.com/v1/bi/datasets" \
-H "Authorization: Bearer $APUS_TOKEN"{
"data": [
{
"id": "ds_sales",
"name": "Sales orders",
"module": "crm",
"fields": [
{
"name": "order_date",
"type": "date",
"role": "dimension"
},
{
"name": "region",
"type": "string",
"role": "dimension"
},
{
"name": "channel",
"type": "string",
"role": "dimension"
},
{
"name": "revenue",
"type": "number",
"role": "metric"
},
{
"name": "quantity",
"type": "number",
"role": "metric"
}
]
}
],
"has_more": true,
"next_cursor": "crsr_9a10"
}/v1/bi/datasets/{id}Scope: bi:readRetrieve a dataset
Returns a single dataset by its id, including the full field list and each field's role.
| idrequired | stringDataset id. |
curl "https://api.apusplatform.com/v1/bi/datasets/ds_sales" \
-H "Authorization: Bearer $APUS_TOKEN"{
"id": "ds_sales",
"name": "Sales orders",
"module": "crm",
"grain": "order_line",
"fields": [
{
"name": "order_date",
"type": "date",
"role": "dimension"
},
{
"name": "region",
"type": "string",
"role": "dimension"
},
{
"name": "channel",
"type": "string",
"role": "dimension"
},
{
"name": "revenue",
"type": "number",
"role": "metric"
},
{
"name": "quantity",
"type": "number",
"role": "metric"
}
],
"updated_at": "2026-07-12T04:20:11Z"
}/v1/bi/queriesScope: bi:readRun a query
Runs an ad-hoc analytics query against a dataset and returns a columnar result set. Read-only — nothing is persisted.
| datasetrequired | stringDataset id to query. |
| metricsrequired | arrayAggregations to compute, e.g. ["sum(revenue)", "count()"]. |
| dimensionsoptional | arrayFields to group by, e.g. ["region"]. |
| filtersoptional | objectField → condition map, e.g. { "order_date": { "gte": "2026-01-01" } }. |
curl -X POST "https://api.apusplatform.com/v1/bi/queries" \
-H "Authorization: Bearer $APUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dataset": "ds_sales",
"metrics": [
"sum(revenue)"
],
"dimensions": [
"region"
],
"filters": {
"order_date": {
"gte": "2026-01-01"
}
}
}'{
"columns": [
{
"name": "region",
"type": "string"
},
{
"name": "sum(revenue)",
"type": "number"
}
],
"rows": [
[
"North",
4820000000
],
[
"South",
3110000000
]
],
"row_count": 2,
"currency": "VND"
}/v1/bi/kpisScope: bi:readList KPIs
Returns the configured KPIs with their current value, target and trend.
| groupoptional | stringFilter by KPI group code. |
curl "https://api.apusplatform.com/v1/bi/kpis" \
-H "Authorization: Bearer $APUS_TOKEN"{
"data": [
{
"id": "kpi_gross_margin",
"name": "Gross margin",
"unit": "percent",
"value": 38.4,
"target": 40,
"trend": "up",
"period": "2026-07"
}
]
}/v1/bi/kpis/{id}Scope: bi:readRetrieve a KPI
Returns a single KPI by its id, including its recent value series.
| idrequired | stringKPI id. |
curl "https://api.apusplatform.com/v1/bi/kpis/kpi_gross_margin" \
-H "Authorization: Bearer $APUS_TOKEN"{
"id": "kpi_gross_margin",
"name": "Gross margin",
"unit": "percent",
"value": 38.4,
"target": 40,
"trend": "up",
"series": [
{
"period": "2026-05",
"value": 36.9
},
{
"period": "2026-06",
"value": 37.6
},
{
"period": "2026-07",
"value": 38.4
}
]
}/v1/bi/dashboardsScope: bi:readList dashboards
Returns a cursor-paginated list of dashboards.
| limitoptional | integerPage size, 1–200 (default 50). |
| cursoroptional | stringPagination cursor from a previous response. |
curl "https://api.apusplatform.com/v1/bi/dashboards" \
-H "Authorization: Bearer $APUS_TOKEN"{
"data": [
{
"id": "dsh_exec",
"name": "Executive overview",
"tile_count": 6,
"updated_at": "2026-07-18T09:00:00Z"
}
],
"has_more": false
}/v1/bi/dashboards/{id}Scope: bi:readRetrieve a dashboard
Returns a dashboard with its tile layout. Each tile references a KPI or a saved query.
| idrequired | stringDashboard id. |
curl "https://api.apusplatform.com/v1/bi/dashboards/dsh_exec" \
-H "Authorization: Bearer $APUS_TOKEN"{
"id": "dsh_exec",
"name": "Executive overview",
"tiles": [
{
"id": "tl_1",
"type": "kpi",
"kpi": "kpi_gross_margin",
"x": 0,
"y": 0,
"w": 3,
"h": 2
},
{
"id": "tl_2",
"type": "chart",
"dataset": "ds_sales",
"metrics": [
"sum(revenue)"
],
"dimensions": [
"region"
],
"x": 3,
"y": 0,
"w": 6,
"h": 4
}
],
"updated_at": "2026-07-18T09:00:00Z"
}/v1/bi/reportsScope: bi:readList reports
Returns the catalog of saved reports and the parameters each one accepts.
No parameters.
curl "https://api.apusplatform.com/v1/bi/reports" \
-H "Authorization: Bearer $APUS_TOKEN"{
"data": [
{
"id": "rpt_pnl",
"name": "Profit & loss",
"params": [
{
"name": "period",
"type": "string",
"required": true
},
{
"name": "cost_center",
"type": "string",
"required": false
}
]
}
]
}/v1/bi/reports/{id}/runsScope: bi:readRun a report
Executes a saved report with the supplied parameters and returns a run. Large reports finish asynchronously — poll the run or subscribe to a webhook.
| idrequired | stringReport id. |
| paramsoptional | objectParameter map for the report, e.g. { "period": "2026-07" }. |
curl -X POST "https://api.apusplatform.com/v1/bi/reports/run_5f2a/runs" \
-H "Authorization: Bearer $APUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"params": {
"period": "2026-07",
"cost_center": "cc_ops"
}
}'{
"id": "run_5f2a",
"report": "rpt_pnl",
"status": "queued",
"params": {
"period": "2026-07",
"cost_center": "cc_ops"
},
"requested_at": "2026-07-20T02:10:00Z"
}/v1/bi/exportsScope: bi:readCreate an export
Starts an asynchronous export of a dataset to a downloadable file. The export reads data only; poll it for a download_url.
| datasetrequired | stringDataset id to export. |
| formatrequired | stringOutput format: csv, xlsx or json. |
| filtersoptional | objectField → condition map applied before export. |
curl -X POST "https://api.apusplatform.com/v1/bi/exports" \
-H "Authorization: Bearer $APUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dataset": "ds_sales",
"format": "csv",
"filters": {
"order_date": {
"gte": "2026-01-01"
}
}
}'{
"id": "exp_3c8d",
"dataset": "ds_sales",
"format": "csv",
"status": "pending",
"created_at": "2026-07-20T02:10:00Z"
}/v1/bi/exports/{id}Scope: bi:readRetrieve an export
Returns the export's status. When status is ready a short-lived download_url is included.
| idrequired | stringExport id. |
curl "https://api.apusplatform.com/v1/bi/exports/exp_3c8d" \
-H "Authorization: Bearer $APUS_TOKEN"{
"id": "exp_3c8d",
"dataset": "ds_sales",
"format": "csv",
"status": "ready",
"row_count": 18402,
"download_url": "https://files.apusplatform.com/exports/exp_3c8d.csv?token=…",
"expires_at": "2026-07-20T03:10:00Z"
}جاهز للتكامل؟
أنشئ عميل API في وحدة تحكم الحساب للحصول على بيانات الاعتماد، أو تحدّث إلى مهندس تكامل حول حالة الاستخدام الخاصة بك.