Open API Guide

Public Reporting API v1

Machine-readable financial insights for civic dashboards, transparency portals, and institutional integrations.

Endpoint

GET https://mbsa.padat.net/api/v1/public-reports

Query Parameters

Name Type Description
year integer Reporting year. Defaults to current year.
kategori string Filter by category: high-high, high-low, low-high, low-low.
department integer Filter by department id (perlaksana or sokongan match).

Example Request

GET https://mbsa.padat.net/api/v1/public-reports?year=2026&kategori=high-high&department=1

Example Response (truncated)

{
  "version": "v1",
  "meta": {
    "selected_year": 2026,
    "available_years": [2023, 2024, 2025, 2026],
    "generated_at": "2026-04-02T00:00:00+08:00",
    "applied_filters": {
      "kategori": "high-high",
      "department": 1
    }
  },
  "summary": {
    "total_hasil": 0,
    "total_penjimatan": 0,
    "proposal_count": 0,
    "department_count": 0
  },
  "charts": {
    "monthly": { "labels": ["Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"], "hasil": [0], "penjimatan": [0] },
    "quarterly": { "labels": ["Q1", "Q2", "Q3", "Q4"], "hasil": [0], "penjimatan": [0] },
    "kategori_distribution": { "labels": ["high-high"], "values": [1] }
  }
}