Admin API Overview
The Admin API provides complete RESTful endpoints for managing all MiniGateway entities.
Base URL
Section titled “Base URL”The Admin API is available at:
http://localhost:8080/api/Response Format
Section titled “Response Format”All endpoints return consistent JSON responses:
Success Response
Section titled “Success Response”{ "success": true, "data": { ... }, "meta": { "timestamp": "2026-04-11T00:00:00Z" }}Error Response
Section titled “Error Response”{ "success": false, "error": { "code": "VALIDATION_ERROR", "message": "Invalid input data", "details": [ ... ] }}Authentication
Section titled “Authentication”Common Patterns
Section titled “Common Patterns”Pagination
Section titled “Pagination”List endpoints support pagination:
GET /api/services?page=1&limit=20Response:
{ "success": true, "data": [...], "meta": { "pagination": { "page": 1, "limit": 20, "total": 100, "totalPages": 5 } }}Filtering
Section titled “Filtering”Filter by related entities:
GET /api/routes?serviceId=service_abcGET /api/targets?upstreamId=upstream_xyzOrdering
Section titled “Ordering”Sort results:
GET /api/services?orderBy=createdAt&orderDirection=descAvailable Endpoints
Section titled “Available Endpoints”| Resource | Endpoints |
|---|---|
| Services | GET, POST, GET /:id, PUT /:id, DELETE /:id |
| Routes | GET, POST, GET /:id, PUT /:id, DELETE /:id |
| Upstreams | GET, POST, GET /:id, PUT /:id, DELETE /:id |
| Targets | GET, POST, GET /:id, PUT /:id, DELETE /:id |
| Consumers | GET, POST, GET /:id, PUT /:id, DELETE /:id |
| Credentials | GET, POST, GET /:id, PUT /:id, DELETE /:id |
| Plugins | GET, POST, GET /:id, PUT /:id, DELETE /:id |
| LLM Providers | GET, POST, GET /:id, PUT /:id, DELETE /:id |
| LLM Models | GET, POST, GET /:id, PUT /:id, DELETE /:id |
Content Type
Section titled “Content Type”All POST and PUT requests require:
Content-Type: application/jsonError Codes
Section titled “Error Codes”| Code | Description |
|---|---|
VALIDATION_ERROR | Invalid request data |
NOT_FOUND | Entity not found |
DUPLICATE | Entity already exists |
RELATION_ERROR | Invalid related entity reference |
INTERNAL_ERROR | Server error |
Next Steps
Section titled “Next Steps”- Services API - Manage services
- Routes API - Configure routing
- LLM Providers API - LLM provider management