API Documentation

WebGIS City RESTful API for accessing Aspirasi Masyarakat, Pokok Pikiran, and Hibah CSR data

Base URL

https://mumpuni.banjarmasinkota.go.id/api/v1/usulan

Authentication

All API endpoints require a valid Bearer token in the Authorization header:

Authorization: Bearer {api_key}

Valid API Key

  • • Exists in api_keys table
  • • Has status = true (active)
  • • Not expired

Common Errors

  • • Missing Authorization header
  • • Invalid API key
  • • Inactive API key

API Endpoints

GET / Get All Data

Returns all data from aspirasi masyarakat, pokok pikiran, and hibah with their survey information.

Response Example:
{
  "success": true,
  "data": {
    "aspirasi_masyarakat": [...],
    "pokok_pikiran": [...],
    "hibah": [...]
  },
  "summary": {
    "total_aspirasi": 10,
    "total_pokok_pikiran": 5,
    "total_hibah": 3,
    "total_all": 18
  }
}
GET /aspirasi Get Aspirasi Masyarakat Only

Returns only aspirasi masyarakat data with their survey information.

Response Example:
{
  "success": true,
  "data": [
    {
      "id": "uuid",
      "judul_usulan": "Example title",
      "deskripsi": "Description",
      "survey": {...},
      "opd_tujuan_nama": "OPD Name",
      "kecamatan_nama": "Kecamatan Name",
      "kelurahan_nama": "Kelurahan Name",
      "sub_kegiatan_nama": "Sub Kegiatan Name"
    }
  ],
  "summary": {
    "total_aspirasi": 10
  }
}
GET /pokok-pikiran Get Pokok Pikiran Only

Returns only pokok pikiran data with their survey information.

Response Example:
{
  "success": true,
  "data": [
    {
      "id": "uuid",
      "judul_usulan": "Example title",
      "deskripsi": "Description",
      "survey": {...},
      "opd_tujuan_nama": "OPD Name",
      "sub_kegiatan_nama": "Sub Kegiatan Name"
    }
  ],
  "summary": {
    "total_pokok_pikiran": 5
  }
}
GET /hibah Get Hibah CSR Only

Returns only hibah CSR data with their survey information.

Response Example:
{
  "success": true,
  "data": [
    {
      "id": "uuid",
      "judul_usulan": "Example title",
      "deskripsi": "Description",
      "survey": {...},
      "opd_tujuan_nama": "OPD Name",
      "kecamatan_nama": "Kecamatan Name",
      "kelurahan_nama": "Kelurahan Name",
      "sub_kegiatan_nama": "Sub Kegiatan Name"
    }
  ],
  "summary": {
    "total_hibah": 3
  }
}
GET /{type}/{id} Get Detailed Data

Returns detailed data for a specific record by ID and type.

/aspirasi/{id}

Get specific aspirasi

/pokok-pikiran/{id}

Get specific pokok pikiran

/hibah/{id}

Get specific hibah

Parameter: id (string) - UUID of the record

Error Responses

401

Unauthorized

Missing token:
{
  "success": false,
  "message": "Bearer token required"
}
Invalid token:
{
  "success": false,
  "message": "Invalid or inactive API key"
}
404

Not Found

Record not found:
{
  "success": false,
  "message": "Data aspirasi masyarakat tidak ditemukan"
}

Example Usage

Using curl

# Get all data
curl -H "Authorization: Bearer your_api_key_here" \
     https://mumpuni.banjarmasinkota.go.id/api/v1/usulan

# Get only aspirasi data
curl -H "Authorization: Bearer your_api_key_here" \
     https://mumpuni.banjarmasinkota.go.id/api/v1/usulan/aspirasi

# Get only pokok pikiran data
curl -H "Authorization: Bearer your_api_key_here" \
     https://mumpuni.banjarmasinkota.go.id/api/v1/usulan/pokok-pikiran

# Get only hibah data
curl -H "Authorization: Bearer your_api_key_here" \
     https://mumpuni.banjarmasinkota.go.id/api/v1/usulan/hibah

Using JavaScript

// Get all data
const allResponse = await fetch('https://mumpuni.banjarmasinkota.go.id/api/v1/usulan', {
  headers: {
    'Authorization': 'Bearer your_api_key_here',
    'Content-Type': 'application/json'
  }
});

// Get only aspirasi data
const aspirasiResponse = await fetch('https://mumpuni.banjarmasinkota.go.id/api/v1/usulan/aspirasi', {
  headers: {
    'Authorization': 'Bearer your_api_key_here',
    'Content-Type': 'application/json'
  }
});

const data = await allResponse.json();
console.log(data);

Important Notes

Data Format

  • • All IDs are UUIDs
  • • Survey data is optional and may be null
  • • All timestamps are in UTC
  • • API returns JSON responses only

Location Data

  • • Kecamatan & Kelurahan: Aspirasi & Hibah
  • • OPD Tujuan: All data types
  • • Sub Kegiatan: All data types
  • • Geographic coordinates: When available