📚 API Documentation

Dokumentasi lengkap OpenBudget.ID REST API

Base URL: http://localhost:3000
Version: v1
Format: JSON

Authentication

🔐 Session-Based (Admin)

Ministry officials login with Google OAuth. Session cookies are automatically included in requests.

Cookie: next-auth.session-token

👛 Wallet Signature (Blockchain)

For blockchain operations, transactions must be signed with connected Solana wallet (Phantom/Solflare).

Body: { transaction: "base64..." }

Error Handling

400

Bad Request

Invalid request parameters

401

Unauthorized

Authentication required

403

Forbidden

Insufficient permissions

404

Not Found

Resource not found

500

Internal Server Error

Server-side error occurred

Error Response Format:

JSON
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid project data",
    "details": "Total amount must be a positive number"
  }
}

Rate Limiting & Best Practices

⚡ Rate Limits

  • • Public endpoints: 100 requests/minute
  • • Authenticated: 300 requests/minute
  • • Blockchain ops: 10 transactions/minute

✅ Best Practices

  • • Cache responses when possible
  • • Use pagination for large datasets
  • • Handle errors gracefully with retries
Pitch Deck
Garuda Spark 2025
🏆
View our hackathon presentation 🎯