spring-boot-admin-docs/src/site/docs/10-reference/20-rest-api.md
Complete HTTP API reference for Spring Boot Admin Server.
Default: http://localhost:8080
With custom context path:
spring:
boot:
admin:
context-path: /admin
Base URL becomes: http://localhost:8080/admin
application/jsonapplication/json or application/hal+jsontext/event-stream (Server-Sent Events)If Spring Security is enabled, all endpoints require authentication:
curl -u user:password http://localhost:8080/instances
Or use token-based authentication as configured in your security setup.
Register a new instance with the Admin Server.
Endpoint: POST /instances
Request Body:
{
"name": "my-service",
"managementUrl": "http://localhost:8081/actuator",
"healthUrl": "http://localhost:8081/actuator/health",
"serviceUrl": "http://localhost:8081",
"metadata": {
"startup": "2026-02-07T10:00:00Z",
"tags": {
"environment": "production"
}
}
}
Response: 201 Created
{
"id": "abc123def456"
}
Headers:
Location: /instances/abc123def456Example:
curl -X POST http://localhost:8080/instances \
-H "Content-Type: application/json" \
-d '{
"name": "my-service",
"managementUrl": "http://localhost:8081/actuator",
"healthUrl": "http://localhost:8081/actuator/health",
"serviceUrl": "http://localhost:8081"
}'
Get all registered instances.
Endpoint: GET /instances
Response: 200 OK
[
{
"id": "abc123def456",
"version": 5,
"registration": {
"name": "my-service",
"managementUrl": "http://localhost:8081/actuator",
"healthUrl": "http://localhost:8081/actuator/health",
"serviceUrl": "http://localhost:8081",
"source": "http-api",
"metadata": {}
},
"registered": true,
"statusInfo": {
"status": "UP",
"details": {}
},
"statusTimestamp": "2026-02-07T10:05:00Z",
"info": {},
"endpoints": [
{
"id": "health",
"url": "http://localhost:8081/actuator/health"
},
{
"id": "metrics",
"url": "http://localhost:8081/actuator/metrics"
}
],
"buildVersion": "1.0.0",
"tags": {
"environment": "production"
}
}
]
Example:
curl http://localhost:8080/instances
Get all instances with a specific name.
Endpoint: GET /instances?name={name}
Parameters:
name (required): Application nameResponse: 200 OK
Same as List All Instances, but filtered.
Example:
curl http://localhost:8080/instances?name=my-service
Get details of a specific instance.
Endpoint: GET /instances/{id}
Parameters:
id (path): Instance IDResponse: 200 OK
{
"id": "abc123def456",
"version": 5,
"registration": {
"name": "my-service",
"managementUrl": "http://localhost:8081/actuator",
"healthUrl": "http://localhost:8081/actuator/health",
"serviceUrl": "http://localhost:8081"
},
"registered": true,
"statusInfo": {
"status": "UP"
},
"endpoints": [...]
}
Example:
curl http://localhost:8080/instances/abc123def456
Remove an instance from the registry.
Endpoint: DELETE /instances/{id}
Parameters:
id (path): Instance IDResponse: 204 No Content
Example:
curl -X DELETE http://localhost:8080/instances/abc123def456
Subscribe to real-time instance events via Server-Sent Events.
Endpoint: GET /instances/events
Response: 200 OK (streaming)
Content-Type: text/event-stream
Event Format:
data:{"instance":"abc123","version":0,"type":"REGISTERED","timestamp":"2026-02-07T10:00:00Z","registration":{...}}
data:{"instance":"abc123","version":1,"type":"ENDPOINTS_DETECTED","timestamp":"2026-02-07T10:00:05Z","endpoints":[...]}
data:{"instance":"abc123","version":2,"type":"STATUS_CHANGED","timestamp":"2026-02-07T10:00:10Z","statusInfo":{"status":"UP"}}
Example:
curl -N http://localhost:8080/instances/events
JavaScript Client:
const eventSource = new EventSource('http://localhost:8080/instances/events');
eventSource.onmessage = (event) => {
const instanceEvent = JSON.parse(event.data);
console.log('Event:', instanceEvent.type, 'for', instanceEvent.instance);
};
Heartbeat: Ping comments sent every 10 seconds to keep connection alive.
Subscribe to events for a specific instance.
Endpoint: GET /instances/{id}/events
Parameters:
id (path): Instance IDResponse: Same as /instances/events, but filtered to single instance.
Example:
curl -N http://localhost:8080/instances/abc123def456/events
Applications represent logical groups of instances with the same name.
Get all applications (grouped instances).
Endpoint: GET /applications
Response: 200 OK
[
{
"name": "my-service",
"buildVersion": "1.0.0",
"status": "UP",
"instances": [
{
"id": "abc123",
"healthUrl": "http://instance1:8081/actuator/health",
"statusInfo": {"status": "UP"}
},
{
"id": "def456",
"healthUrl": "http://instance2:8081/actuator/health",
"statusInfo": {"status": "UP"}
}
]
}
]
Example:
curl http://localhost:8080/applications
Get details of a specific application.
Endpoint: GET /applications/{name}
Parameters:
name (path): Application nameResponse: 200 OK
{
"name": "my-service",
"buildVersion": "1.0.0",
"status": "UP",
"instances": [...]
}
Response: 404 Not Found if application doesn't exist.
Example:
curl http://localhost:8080/applications/my-service
Subscribe to application-level events.
Endpoint: GET /applications/events
Response: 200 OK (streaming)
Content-Type: text/event-stream
Example:
curl -N http://localhost:8080/applications/events
Trigger manual refresh of all instances from service discovery.
Endpoint: POST /applications
Response: 200 OK
Example:
curl -X POST http://localhost:8080/applications
Use Case: Force refresh when using service discovery (Eureka, Consul, etc.)
Deregister all instances of an application.
Endpoint: DELETE /applications/{name}
Parameters:
name (path): Application nameResponse: 204 No Content
Example:
curl -X DELETE http://localhost:8080/applications/my-service
Admin Server proxies requests to instance actuator endpoints.
Endpoint: GET /instances/{id}/actuator/{endpoint}
Parameters:
id (path): Instance IDendpoint (path): Actuator endpoint nameResponse: Proxied response from instance
Examples:
# Get health
curl http://localhost:8080/instances/abc123/actuator/health
# Get metrics
curl http://localhost:8080/instances/abc123/actuator/metrics
# Get specific metric
curl http://localhost:8080/instances/abc123/actuator/metrics/jvm.memory.used
# Get environment
curl http://localhost:8080/instances/abc123/actuator/env
# Get loggers
curl http://localhost:8080/instances/abc123/actuator/loggers
| Endpoint | Description |
|---|---|
/actuator/health | Health status |
/actuator/info | Build and app info |
/actuator/metrics | Metrics list |
/actuator/metrics/{name} | Specific metric |
/actuator/env | Environment properties |
/actuator/loggers | Logger configuration |
/actuator/loggers/{name} | Specific logger |
/actuator/httptrace | HTTP trace |
/actuator/threaddump | Thread dump |
/actuator/heapdump | Heap dump (binary) |
/actuator/jolokia | JMX via Jolokia |
Endpoint: POST /instances/{id}/actuator/loggers/{name}
Request Body:
{
"configuredLevel": "DEBUG"
}
Example:
curl -X POST http://localhost:8080/instances/abc123/actuator/loggers/com.example \
-H "Content-Type: application/json" \
-d '{"configuredLevel":"DEBUG"}'
Restart a Spring Boot application (requires spring-boot-starter-actuator with restart endpoint).
Endpoint: POST /instances/{id}/actuator/restart
Response: 200 OK
Example:
curl -X POST http://localhost:8080/instances/abc123/actuator/restart
:::warning Dangerous Operation This will restart the application. Ensure the restart endpoint is properly secured. :::
Gracefully shutdown a Spring Boot application.
Endpoint: POST /instances/{id}/actuator/shutdown
Response: 200 OK
{
"message": "Shutting down, bye..."
}
Example:
curl -X POST http://localhost:8080/instances/abc123/actuator/shutdown
:::warning Dangerous Operation This will shut down the application. Ensure the shutdown endpoint is properly secured and consider it carefully in production. :::
Invalid request body or parameters.
{
"error": "Bad Request",
"message": "Invalid registration data",
"status": 400
}
Instance or application not found.
{
"error": "Not Found",
"message": "Instance not found: abc123",
"status": 404
}
Server error.
{
"error": "Internal Server Error",
"message": "Failed to register instance",
"status": 500
}
Cross-Origin Resource Sharing (CORS) configuration:
spring:
boot:
admin:
cors:
allowed-origins: "http://localhost:3000"
allowed-methods: "GET,POST,DELETE"
allowed-headers: "*"
exposed-headers: "Location"
allow-credentials: true
max-age: 3600
No built-in rate limiting. Use reverse proxy (nginx, API gateway) for rate limiting if needed.
Instance and application lists are not paginated. For large deployments, consider filtering by name or using service discovery-based filtering.
Responses are not cached by default. Add caching headers via reverse proxy if needed.
Not supported. Use Server-Sent Events (SSE) for real-time updates.
RestTemplate restTemplate = new RestTemplate();
// Register instance
Registration registration = Registration.create("my-service")
.managementUrl("http://localhost:8081/actuator")
.healthUrl("http://localhost:8081/actuator/health")
.serviceUrl("http://localhost:8081")
.build();
ResponseEntity<Map> response = restTemplate.postForEntity(
"http://localhost:8080/instances",
registration,
Map.class
);
String instanceId = (String) response.getBody().get("id");
// Register instance
const registration = {
name: 'my-service',
managementUrl: 'http://localhost:8081/actuator',
healthUrl: 'http://localhost:8081/actuator/health',
serviceUrl: 'http://localhost:8081'
};
const response = await fetch('http://localhost:8080/instances', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(registration)
});
const { id } = await response.json();
console.log('Instance ID:', id);
import requests
# Register instance
registration = {
"name": "my-service",
"managementUrl": "http://localhost:8081/actuator",
"healthUrl": "http://localhost:8081/actuator/health",
"serviceUrl": "http://localhost:8081"
}
response = requests.post(
"http://localhost:8080/instances",
json=registration
)
instance_id = response.json()["id"]
print(f"Instance ID: {instance_id}")