class InstanceResource {

    @GET
    @Path("/{instanceId}/serviceStatusInfo")
    @Produces(MediaType.APPLICATION_JSON)
    public ServiceStatusInfo getServiceStatus(
            @PathParam("instanceId") String instanceId,
            @QueryParam("clusterId") String clusterIdString,
            @QueryParam("serviceType") String serviceTypeString,
            @QueryParam("configId") String configIdString) {
        ApplicationInstanceReference reference = parseInstanceId(instanceId);
        ApplicationId applicationId = OrchestratorUtil.toApplicationId(reference);

        if (clusterIdString == null) {
            throwBadRequest("Missing clusterId query parameter");
        }

        if (serviceTypeString == null) {
            throwBadRequest("Missing serviceType query parameter");
        }

        if (configIdString == null) {
            throwBadRequest("Missing configId query parameter");
        }

        ClusterId clusterId = new ClusterId(clusterIdString);
        ServiceType serviceType = new ServiceType(serviceTypeString);
        ConfigId configId = new ConfigId(configIdString);

        return rootManager.getStatus(applicationId, clusterId, serviceType, configId);
    }

    @Inject public  InstanceResource(@Component ServiceMonitor serviceMonitor,
                            @Component StatusService statusService,
                            @Component SlobrokApi slobrokApi,
                            @Component UnionMonitorManager rootManager);

}