private InstanceStatusResponse getInstance(RestApi.RequestContext context) {
        String instanceIdString = context.pathParameters().getStringOrThrow("instanceId");
        ApplicationInstanceReference instanceId = parseInstanceId(instanceIdString);

        ApplicationInstance applicationInstance
                = serviceMonitor.getApplication(instanceId)
                .orElseThrow(RestApiException.NotFound::new);

        HostInfos hostInfos = statusService.getHostInfosByApplicationResolver().apply(applicationInstance.reference());
        TreeMap<HostName, WireHostInfo> hostStatusMap =
                getHostsUsedByApplicationInstance(applicationInstance)
                        .stream()
                        .collect(Collectors.toMap(
                                hostName -> hostName,
                                hostName -> hostInfoToWire(hostInfos.getOrNoRemarks(hostName)),
                                (u, v) -> { throw new IllegalStateException(); },
                                TreeMap::new));
        return InstanceStatusResponse.create(applicationInstance, hostStatusMap);
    }
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