class PublicApiHandler {

    @GET
    @Path("integrations/{id}/state")
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_JSON)
    public IntegrationState getIntegrationState(@Context SecurityContext sec, @NotNull @PathParam("id") @Parameter(required = true) String integrationId) {
        final Integration integration = getIntegration(integrationId);
        final IntegrationOverview integrationOverview = this.integrationHandler.get(integration.getId().get());
        return new IntegrationState(integrationOverview.getCurrentState(), monitoringProvider.getIntegrationStateDetails(integration.getId().get()));
    }

    protected  PublicApiHandler(DataManager dataMgr, EncryptionComponent encryptionComponent,
        IntegrationDeploymentHandler deploymentHandler, ConnectionHandler connectionHandler,
        MonitoringProvider monitoringProvider, EnvironmentHandler environmentHandler,
        IntegrationSupportHandler handler, IntegrationHandler integrationHandler);

}