java.lang.Object
de.codecentric.boot.admin.server.web.InstancesController

@AdminController @ResponseBody public class InstancesController extends Object
REST controller for controlling registration of managed instances.
  • Constructor Details

  • Method Details

    • register

      @PostMapping(path="/instances", consumes="application/json") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Map<String,InstanceId>>> register(@RequestBody Registration registration, org.springframework.web.util.UriComponentsBuilder builder)
      Register an instance.
      Parameters:
      registration - registration info
      builder - the UriComponentsBuilder
      Returns:
      the registered instance id;
    • instances

      @GetMapping(path="/instances", produces="application/json", params="name") public reactor.core.publisher.Flux<Instance> instances(@RequestParam("name") String name)
      List all registered instances with name
      Parameters:
      name - the name to search for
      Returns:
      application list
    • instances

      @GetMapping(path="/instances", produces="application/json") public reactor.core.publisher.Flux<Instance> instances()
      List all registered instances with name
      Returns:
      application list
    • instance

      @GetMapping(path="/instances/{id}", produces="application/json") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Instance>> instance(@PathVariable String id)
      Get a single instance.
      Parameters:
      id - the application identifier.
      Returns:
      the registered application.
    • unregister

      @DeleteMapping(path="/instances/{id}") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Void>> unregister(@PathVariable String id)
      Unregister an instance
      Parameters:
      id - the instance id.
      Returns:
      response indicating the success
    • events

      @GetMapping(path="/instances/events", produces="application/json") public reactor.core.publisher.Flux<InstanceEvent> events()
      Retrieve all instance events as a JSON array. Returns all events for all registered instances. Useful for reconstructing application state or initializing the UI.
      Returns:
      flux of InstanceEvent objects
    • eventStream

      @GetMapping(path="/instances/events", produces="text/event-stream") public reactor.core.publisher.Flux<org.springframework.http.codec.ServerSentEvent<InstanceEvent>> eventStream()
      Stream all instance events as Server-Sent Events (SSE). Returns a continuous stream of instance events for real-time monitoring and UI updates.
      Returns:
      flux of ServerSentEvent containing InstanceEvent
    • instanceStream

      @GetMapping(path="/instances/{id}", produces="text/event-stream") public reactor.core.publisher.Flux<org.springframework.http.codec.ServerSentEvent<Instance>> instanceStream(@PathVariable String id)
      Stream events for a specific instance as Server-Sent Events (SSE). Streams events for the instance identified by its ID. Each event is delivered as an SSE message.
      Parameters:
      id - the instance ID
      Returns:
      flux of ServerSentEvent containing Instance