class LogbookResource extends ApplicationStatusResource {

    @POST
    @Path("/operations/traceability")
    @Produces(MediaType.APPLICATION_JSON)
    public Response traceability(@HeaderParam(GlobalDataRest.X_TENANT_ID) String xTenantId) {
        if (Strings.isNullOrEmpty(xTenantId)) {
            LOGGER.error(MISSING_THE_TENANT_ID_X_TENANT_ID);
            return Response.status(Response.Status.BAD_REQUEST).build();
        }
        try {
            Integer tenantId = Integer.parseInt(xTenantId);
            GUID guid = GUIDFactory.newOperationLogbookGUID(tenantId);

            VitamThreadUtils.getVitamSession().setTenantId(tenantId);
            // FIXME: 01/01/2020 request id should be set in the external headers by filter
            VitamThreadUtils.getVitamSession().setRequestId(guid);

            logbookAdministration.generateSecureLogbook(guid);
            final List<String> resultAsJson = new ArrayList<>();

            resultAsJson.add(guid.toString());
            return Response.status(Status.OK)
                .entity(new RequestResponseOK<String>()
                    .addAllResults(resultAsJson)
                    .setHits(1, 0, 1)
                    .setHttpCode(Status.OK.getStatusCode()))
                .build();

        } catch (TraceabilityException e) {
            LOGGER.error("unable to generate traceability log", e);
            // FIXME: Why put a responseOK when exception catch ?
            return Response.status(Status.INTERNAL_SERVER_ERROR)
                .entity(new RequestResponseOK()
                    .setHttpCode(Status.INTERNAL_SERVER_ERROR.getStatusCode()))
                .build();
        }
    }

    public  LogbookResource(LogbookConfiguration configuration, OntologyLoader ontologyLoader);

}