private static RestApi createRestApiDefinition(InstanceRequestHandler self) {
        return RestApi.builder()
                .addRoute(RestApi.route("/orchestrator/v1/instances")
                        .get(self::getAllInstances))
                .addRoute(RestApi.route("/orchestrator/v1/instances/{instanceId}")
                        .get(self::getInstance))
                .addRoute(RestApi.route("/orchestrator/v1/instances/{instanceId}/slobrok")
                        .get(self::getSlobrokEntries))
                .addRoute(RestApi.route("/orchestrator/v1/instances/{instanceId}/serviceStatusInfo")
                        .get(self::getServiceStatus))
                .registerJacksonResponseEntity(List.class)
                .registerJacksonResponseEntity(InstanceStatusResponse.class)
                .registerJacksonResponseEntity(ServiceStatusInfo.class)
                // Overriding object mapper to change serialization of timestamps
                .setObjectMapper(new ObjectMapper()
                        .registerModule(new JavaTimeModule())
                        .registerModule(new Jdk8Module())
                        .configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, true))
                .build();
    }
Provides a read-only API for looking into the current state as seen by the Orchestrator.
This API can be unstable and is not meant to be used programmatically.

@author andreer
@author Oyvind Bakksjo
@author bjorncs
orchestrator/src/main/java/com/yahoo/vespa/orchestrator/resources/InstanceRequestHandler.java