@GET @Path("/clusters/{clusterId}/services/storm/mainpage/url") @Timed public Response getMainPageByClusterId(@PathParam("clusterId") Long clusterId, @Context SecurityContext securityContext) { SecurityUtil.checkPermissions(authorizer, securityContext, Cluster.NAMESPACE, clusterId, READ); try { StormMetadataService stormMetadataService = new StormMetadataService .Builder(environmentService, clusterId, securityContext, subject).build(); return WSUtils.respondEntity(Collections.singletonMap("url", stormMetadataService.getMainPageUrl()), OK); } catch (EntityNotFoundException ex) { throw com.hortonworks.streamline.common.exception.service.exception.request.EntityNotFoundException.byId(ex.getMessage()); } } }