跳转到内容

Admin API Overview

此内容尚不支持你的语言。

The Admin API provides complete RESTful endpoints for managing all MiniGateway entities.

The Admin API is available at:

http://localhost:8080/api/

All endpoints return consistent JSON responses:

{
"success": true,
"data": { ... },
"meta": {
"timestamp": "2026-04-11T00:00:00Z"
}
}
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input data",
"details": [ ... ]
}
}

List endpoints support pagination:

Terminal window
GET /api/services?page=1&limit=20

Response:

{
"success": true,
"data": [...],
"meta": {
"pagination": {
"page": 1,
"limit": 20,
"total": 100,
"totalPages": 5
}
}
}

Filter by related entities:

Terminal window
GET /api/routes?serviceId=service_abc
GET /api/targets?upstreamId=upstream_xyz

Sort results:

Terminal window
GET /api/services?orderBy=createdAt&orderDirection=desc
ResourceEndpoints
ServicesGET, POST, GET /:id, PUT /:id, DELETE /:id
RoutesGET, POST, GET /:id, PUT /:id, DELETE /:id
UpstreamsGET, POST, GET /:id, PUT /:id, DELETE /:id
TargetsGET, POST, GET /:id, PUT /:id, DELETE /:id
ConsumersGET, POST, GET /:id, PUT /:id, DELETE /:id
CredentialsGET, POST, GET /:id, PUT /:id, DELETE /:id
PluginsGET, POST, GET /:id, PUT /:id, DELETE /:id
LLM ProvidersGET, POST, GET /:id, PUT /:id, DELETE /:id
LLM ModelsGET, POST, GET /:id, PUT /:id, DELETE /:id

All POST and PUT requests require:

Content-Type: application/json
CodeDescription
VALIDATION_ERRORInvalid request data
NOT_FOUNDEntity not found
DUPLICATEEntity already exists
RELATION_ERRORInvalid related entity reference
INTERNAL_ERRORServer error