package fr.insee.rmes.api;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("/healthcheck")
public class HealthcheckApi extends AbstractMetadataApi {

    @GET
    @Produces({
        MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML
    })
    public Response getHealthcheck() {
        return Response.ok().build();
    }
}

@@ -177,16 +177,64 @@
 nse;%0D%0A%0D%0A
+import org.apache.commons.lang3.StringUtils;%0D%0A%0D%0A
 @Path(%22/
@@ -306,16 +306,85 @@
 taApi %7B%0D
+%0A    %0D%0A%0D%0Aprivate final static String ASK_QUERY = %22ASK %7B ?a a ?b .%7D%22;%0D
 %0A%0D%0A    @
@@ -528,45 +528,282 @@
     
-return Response.ok().build();%0D%0A    %7D%0D%0A
+if (StringUtils.isEmpty(sparqlUtils.executeSparqlQuery(%22SELECT * %7B ?s a ?t %7D LIMIT 1%22))) %7B%0D%0A            return Response.serverError().build();%0D%0A        %7D%0D%0A        return Response.ok().build();%0D%0A    %7D%0D%0A%7D%0D%0A%0D%0A//https://qfrmessnczlht01.ad.insee.intra/sparql?query=ASK+%7B+?a+a+?b+.
 %7D%0D%0A

Update HealthcheckApi.java