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:
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 All Data
Returns all data from aspirasi masyarakat, pokok pikiran, and hibah with their survey information.
{
"success": true,
"data": {
"aspirasi_masyarakat": [...],
"pokok_pikiran": [...],
"hibah": [...]
},
"summary": {
"total_aspirasi": 10,
"total_pokok_pikiran": 5,
"total_hibah": 3,
"total_all": 18
}
}
/aspirasi
Get Aspirasi Masyarakat Only
Returns only aspirasi masyarakat data with their survey information.
{
"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
}
}
/pokok-pikiran
Get Pokok Pikiran Only
Returns only pokok pikiran data with their survey information.
{
"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
}
}
/hibah
Get Hibah CSR Only
Returns only hibah CSR data with their survey information.
{
"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
}
}
/{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
Unauthorized
{
"success": false,
"message": "Bearer token required"
}
{
"success": false,
"message": "Invalid or inactive API key"
}
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