メインコンテンツにスキップ
ログイン
Apus Platform
ドキュメント目次
bi

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.

GET/v1/bi/datasetsScope: bi:read

List datasets

Returns a cursor-paginated list of queryable datasets (modelled facts + dimensions). Each dataset exposes the fields you can use as metrics or dimensions.

Query parameters
limitoptionalintegerPage size, 1–200 (default 50).
cursoroptionalstringPagination cursor from a previous response.
moduleoptionalstringFilter by source module code, e.g. finance, crm.
Request
curl "https://api.apusplatform.com/v1/bi/datasets" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "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"
}
GET/v1/bi/datasets/{id}Scope: bi:read

Retrieve a dataset

Returns a single dataset by its id, including the full field list and each field's role.

Path parameters
idrequiredstringDataset id.
Request
curl "https://api.apusplatform.com/v1/bi/datasets/ds_sales" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "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"
}
POST/v1/bi/queriesScope: bi:read

Run a query

Runs an ad-hoc analytics query against a dataset and returns a columnar result set. Read-only — nothing is persisted.

Body
datasetrequiredstringDataset id to query.
metricsrequiredarrayAggregations to compute, e.g. ["sum(revenue)", "count()"].
dimensionsoptionalarrayFields to group by, e.g. ["region"].
filtersoptionalobjectField → condition map, e.g. { "order_date": { "gte": "2026-01-01" } }.
Request
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"
      }
    }
  }'
Response
{
  "columns": [
    {
      "name": "region",
      "type": "string"
    },
    {
      "name": "sum(revenue)",
      "type": "number"
    }
  ],
  "rows": [
    [
      "North",
      4820000000
    ],
    [
      "South",
      3110000000
    ]
  ],
  "row_count": 2,
  "currency": "VND"
}
GET/v1/bi/kpisScope: bi:read

List KPIs

Returns the configured KPIs with their current value, target and trend.

Query parameters
groupoptionalstringFilter by KPI group code.
Request
curl "https://api.apusplatform.com/v1/bi/kpis" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "kpi_gross_margin",
      "name": "Gross margin",
      "unit": "percent",
      "value": 38.4,
      "target": 40,
      "trend": "up",
      "period": "2026-07"
    }
  ]
}
GET/v1/bi/kpis/{id}Scope: bi:read

Retrieve a KPI

Returns a single KPI by its id, including its recent value series.

Path parameters
idrequiredstringKPI id.
Request
curl "https://api.apusplatform.com/v1/bi/kpis/kpi_gross_margin" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "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
    }
  ]
}
GET/v1/bi/dashboardsScope: bi:read

List dashboards

Returns a cursor-paginated list of dashboards.

Query parameters
limitoptionalintegerPage size, 1–200 (default 50).
cursoroptionalstringPagination cursor from a previous response.
Request
curl "https://api.apusplatform.com/v1/bi/dashboards" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "dsh_exec",
      "name": "Executive overview",
      "tile_count": 6,
      "updated_at": "2026-07-18T09:00:00Z"
    }
  ],
  "has_more": false
}
GET/v1/bi/dashboards/{id}Scope: bi:read

Retrieve a dashboard

Returns a dashboard with its tile layout. Each tile references a KPI or a saved query.

Path parameters
idrequiredstringDashboard id.
Request
curl "https://api.apusplatform.com/v1/bi/dashboards/dsh_exec" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "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"
}
GET/v1/bi/reportsScope: bi:read

List reports

Returns the catalog of saved reports and the parameters each one accepts.

No parameters.

Request
curl "https://api.apusplatform.com/v1/bi/reports" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "rpt_pnl",
      "name": "Profit & loss",
      "params": [
        {
          "name": "period",
          "type": "string",
          "required": true
        },
        {
          "name": "cost_center",
          "type": "string",
          "required": false
        }
      ]
    }
  ]
}
POST/v1/bi/reports/{id}/runsScope: bi:read

Run 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.

Path parameters
idrequiredstringReport id.
Body
paramsoptionalobjectParameter map for the report, e.g. { "period": "2026-07" }.
Request
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"
    }
  }'
Response
{
  "id": "run_5f2a",
  "report": "rpt_pnl",
  "status": "queued",
  "params": {
    "period": "2026-07",
    "cost_center": "cc_ops"
  },
  "requested_at": "2026-07-20T02:10:00Z"
}
POST/v1/bi/exportsScope: bi:read

Create an export

Starts an asynchronous export of a dataset to a downloadable file. The export reads data only; poll it for a download_url.

Body
datasetrequiredstringDataset id to export.
formatrequiredstringOutput format: csv, xlsx or json.
filtersoptionalobjectField → condition map applied before export.
Request
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"
      }
    }
  }'
Response
{
  "id": "exp_3c8d",
  "dataset": "ds_sales",
  "format": "csv",
  "status": "pending",
  "created_at": "2026-07-20T02:10:00Z"
}
GET/v1/bi/exports/{id}Scope: bi:read

Retrieve an export

Returns the export's status. When status is ready a short-lived download_url is included.

Path parameters
idrequiredstringExport id.
Request
curl "https://api.apusplatform.com/v1/bi/exports/exp_3c8d" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "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 クライアントを作成して認証情報を取得するか、インテグレーションエンジニアにユースケースをご相談ください。

noindex