@Test public void testDisposeContainerWithManagementDisabled() { KieServerRestImpl restServer = new KieServerRestImpl(kieServer); Response response = restServer.disposeContainer(headers, "test"); assertForbiddenResponse(response); }
@ApiOperation(value="Disposes a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=DISPOSE_CONTAINER_RESPONSE_JSON)})) }) @DELETE @Path("containers/{" + CONTAINER_ID + "}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response disposeContainer( @Context HttpHeaders headers, @ApiParam(value = "Container id to be disposed (undeployed)", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ) { ServiceResponse<?> forbidden = this.server.checkAccessability(); if (forbidden != null) { return createCorrectVariant( forbidden, headers, Status.BAD_REQUEST ); } Header conversationIdHeader = buildConversationIdHeader(id, server.getServerRegistry(), headers); return createCorrectVariant(server.disposeContainer(id), headers, conversationIdHeader); }
KieServerRestImpl { @ApiOperation(value="Disposes a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=DISPOSE_CONTAINER_RESPONSE_JSON)})) }) @DELETE @Path("containers/{" + CONTAINER_ID + "}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response disposeContainer( @Context HttpHeaders headers, @ApiParam(value = "Container id to be disposed (undeployed)", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ) { ServiceResponse<?> forbidden = this.server.checkAccessability(); if (forbidden != null) { return createCorrectVariant( forbidden, headers, Status.BAD_REQUEST ); } Header conversationIdHeader = buildConversationIdHeader(id, server.getServerRegistry(), headers); return createCorrectVariant(server.disposeContainer(id), headers, conversationIdHeader); } }
KieServerRestImpl { @ApiOperation(value="Disposes a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=DISPOSE_CONTAINER_RESPONSE_JSON)})) }) @DELETE @Path("containers/{" + CONTAINER_ID + "}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response disposeContainer( @Context HttpHeaders headers, @ApiParam(value = "Container id to be disposed (undeployed)", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ) { ServiceResponse<?> forbidden = this.server.checkAccessability(); if (forbidden != null) { return createCorrectVariant( forbidden, headers, Status.BAD_REQUEST ); } Header conversationIdHeader = buildConversationIdHeader(id, server.getServerRegistry(), headers); return createCorrectVariant(server.disposeContainer(id), headers, conversationIdHeader); } KieServerRestImpl();  KieServerRestImpl(KieServerImpl server); }
KieServerRestImpl { @ApiOperation(value="Disposes a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=DISPOSE_CONTAINER_RESPONSE_JSON)})) }) @DELETE @Path("containers/{" + CONTAINER_ID + "}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response disposeContainer( @Context HttpHeaders headers, @ApiParam(value = "Container id to be disposed (undeployed)", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ) { ServiceResponse<?> forbidden = this.server.checkAccessability(); if (forbidden != null) { return createCorrectVariant( forbidden, headers, Status.BAD_REQUEST ); } Header conversationIdHeader = buildConversationIdHeader(id, server.getServerRegistry(), headers); return createCorrectVariant(server.disposeContainer(id), headers, conversationIdHeader); } KieServerRestImpl();  KieServerRestImpl(KieServerImpl server); KieServerImpl getServer(); void setServer(KieServerImpl server); @ApiOperation(value="Returns information about the KIE Server. The endpoint for this request is the base URL for the REST API.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_SERVER_INF_RESPONSE_JSON)})) }) @GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getInfo(@Context HttpHeaders headers); @ApiOperation(value="Returns a list of KIE containers on the KIE Server.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_CONTAINERS_RESPONSE_JSON)})) }) @GET @Path("containers") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response listContainers(@Context HttpHeaders headers,
            @ApiParam(value = "optional groupId to filter containers by", required = false) @QueryParam("groupId") String groupId,
            @ApiParam(value = "optional artifactId to filter containers by", required = false) @QueryParam("artifactId") String artifactId,
            @ApiParam(value = "optional version to filter containers by", required = false) @QueryParam("version") String version,
            @ApiParam(value = "optional status to filter containers by", required = false) @QueryParam("status") String status); @ApiOperation(value="Creates a new KIE container in the KIE Server with a specified KIE container ID", response=ServiceResponse.class, code=201) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 400, message = "container could not be created"), @ApiResponse(code = 201, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CREATE_CONTAINER_RESPONSE_JSON)})) }) @PUT @Path("containers/{" + CONTAINER_ID + "}") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response createContainer( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id to be assigned to deployed KIE Container", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id, 
            @ApiParam(value = "KIE Container resource to be deployed as KieContainerResource", required = true, examples=@Example(value= {
                                      @ExampleProperty(mediaType=JSON, value=CREATE_CONTAINER_JSON),
                                      @ExampleProperty(mediaType=XML, value=CREATE_CONTAINER_XML)})) String containerPayload ); @ApiOperation(value="Activates (previously deactivated) KIE container on this server", response=ServiceResponse.class, code=201) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 400, message = "container could not be activated"), @ApiResponse(code = 201, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=ACTIVATE_CONTAINER_RESPONSE_JSON)})) }) @PUT @Path("containers/{" + CONTAINER_ID + "}/status/activated") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response activateContainer( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id of deployed KIE Container", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id); @ApiOperation(value="Deactivates (previously started) KIE container on this server", response=ServiceResponse.class, code=201) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 400, message = "container could not be deactivated"), @ApiResponse(code = 201, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=DEACTIVATE_CONTAINER_RESPONSE_JSON)})) }) @PUT @Path("containers/{" + CONTAINER_ID + "}/status/deactivated") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response deactivateContainer( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id of deployed KIE Container", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id); @ApiOperation(value="Returns information about a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_CONTAINER_RESPONSE_JSON)})) }) @GET @Path("containers/{" + CONTAINER_ID + "}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getContainerInfo( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id to be retrieved", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ); @ApiOperation(value="Disposes a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=DISPOSE_CONTAINER_RESPONSE_JSON)})) }) @DELETE @Path("containers/{" + CONTAINER_ID + "}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response disposeContainer( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id to be disposed (undeployed)", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ); @ApiOperation(value="Returns information about the KIE scanner used for automatic updates in a specified KIE container, if applicable.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_SCANNER_RESPONSE_JSON)})) }) @GET @Path("containers/{" + CONTAINER_ID + "}/scanner") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getScannerInfo( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id for scanner to be loaded", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ); @ApiOperation(value="Starts or stops a KIE scanner that controls polling for updated KIE container deployments, if applicable.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=UPDATE_SCANNER_RESPONSE_JSON)})) }) @POST @Path("containers/{" + CONTAINER_ID + "}/scanner") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response updateScanner( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id for scanner to be updated", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id, 
            @ApiParam(value = "Scanner information given as KieScannerResource type", required = true, examples=@Example(value= {
                                     @ExampleProperty(mediaType=JSON, value=UPDATE_SCANNER_JSON),
                                     @ExampleProperty(mediaType=XML, value=UPDATE_SCANNER_XML)})) String resourcePayload ); @ApiOperation(value="Returns release ID information (group ID, artifact ID, version) for a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_RELEASE_ID_RESPONSE_JSON)})) }) @GET @Path("containers/{" + CONTAINER_ID + "}/release-id") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getReleaseId( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id that release id should be loaded from", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id); @ApiOperation(value="Updates release ID information (group ID, artifact ID, version) for a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=UPDATE_RELEASE_RESPONSE_JSON)})) }) @POST @Path("containers/{" + CONTAINER_ID + "}/release-id") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response updateReleaseId( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id that release id should be upgraded", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id, 
            @ApiParam(value = "Release Id to be upgraded to as ReleaseId type", required = true, examples=@Example(value= {
                                   @ExampleProperty(mediaType=JSON, value=UPDATE_RELEASE_ID_JSON),
                                   @ExampleProperty(mediaType=XML, value=UPDATE_RELEASE_ID_XML)})) String releaseIdPayload,
            @ApiParam(value = "Determines whether active processes are aborted (reset) before updating when the server runs in development mode") @QueryParam("resetBeforeUpdate")  @DefaultValue("false") boolean resetBeforeUpdate); @ApiOperation(value="Returns information about the current state and configurations of the KIE Server.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_SERVER_STATE_RESPONSE_JSON)})) }) @GET @Path("state") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getServerState(@Context HttpHeaders headers); @ApiOperation(value="Readiness check for KIE Server that indicates that server is fully booted and ready to accept requests", response=Void.class, code=200) @ApiResponses(value = { @ApiResponse(code = 503, message = "Service not yet available") }) @GET @Path("readycheck") @Produces({MediaType.TEXT_PLAIN}) Response readycheck(@Context HttpHeaders headers); @ApiOperation(value="Liveness check for KIE Server that validates both kie server and all extensions, optionally produces report", response=Message.class, code=200, responseContainer="List") @ApiResponses(value = { @ApiResponse(code = 503, message = "If any of the checks failed") }) @GET @Path("healthcheck") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response healthcheck(@Context HttpHeaders headers,
                             @ApiParam(value = "optional report flag to return detailed report of the check, defaults to false", required = false) @QueryParam("report")  @DefaultValue("false") boolean report); }
KieServerRestImpl { @ApiOperation(value="Disposes a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=DISPOSE_CONTAINER_RESPONSE_JSON)})) }) @DELETE @Path("containers/{" + CONTAINER_ID + "}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response disposeContainer( @Context HttpHeaders headers, @ApiParam(value = "Container id to be disposed (undeployed)", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ) { ServiceResponse<?> forbidden = this.server.checkAccessability(); if (forbidden != null) { return createCorrectVariant( forbidden, headers, Status.BAD_REQUEST ); } Header conversationIdHeader = buildConversationIdHeader(id, server.getServerRegistry(), headers); return createCorrectVariant(server.disposeContainer(id), headers, conversationIdHeader); } KieServerRestImpl();  KieServerRestImpl(KieServerImpl server); KieServerImpl getServer(); void setServer(KieServerImpl server); @ApiOperation(value="Returns information about the KIE Server. The endpoint for this request is the base URL for the REST API.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_SERVER_INF_RESPONSE_JSON)})) }) @GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getInfo(@Context HttpHeaders headers); @ApiOperation(value="Returns a list of KIE containers on the KIE Server.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_CONTAINERS_RESPONSE_JSON)})) }) @GET @Path("containers") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response listContainers(@Context HttpHeaders headers,
            @ApiParam(value = "optional groupId to filter containers by", required = false) @QueryParam("groupId") String groupId,
            @ApiParam(value = "optional artifactId to filter containers by", required = false) @QueryParam("artifactId") String artifactId,
            @ApiParam(value = "optional version to filter containers by", required = false) @QueryParam("version") String version,
            @ApiParam(value = "optional status to filter containers by", required = false) @QueryParam("status") String status); @ApiOperation(value="Creates a new KIE container in the KIE Server with a specified KIE container ID", response=ServiceResponse.class, code=201) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 400, message = "container could not be created"), @ApiResponse(code = 201, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CREATE_CONTAINER_RESPONSE_JSON)})) }) @PUT @Path("containers/{" + CONTAINER_ID + "}") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response createContainer( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id to be assigned to deployed KIE Container", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id, 
            @ApiParam(value = "KIE Container resource to be deployed as KieContainerResource", required = true, examples=@Example(value= {
                                      @ExampleProperty(mediaType=JSON, value=CREATE_CONTAINER_JSON),
                                      @ExampleProperty(mediaType=XML, value=CREATE_CONTAINER_XML)})) String containerPayload ); @ApiOperation(value="Activates (previously deactivated) KIE container on this server", response=ServiceResponse.class, code=201) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 400, message = "container could not be activated"), @ApiResponse(code = 201, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=ACTIVATE_CONTAINER_RESPONSE_JSON)})) }) @PUT @Path("containers/{" + CONTAINER_ID + "}/status/activated") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response activateContainer( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id of deployed KIE Container", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id); @ApiOperation(value="Deactivates (previously started) KIE container on this server", response=ServiceResponse.class, code=201) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 400, message = "container could not be deactivated"), @ApiResponse(code = 201, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=DEACTIVATE_CONTAINER_RESPONSE_JSON)})) }) @PUT @Path("containers/{" + CONTAINER_ID + "}/status/deactivated") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response deactivateContainer( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id of deployed KIE Container", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id); @ApiOperation(value="Returns information about a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_CONTAINER_RESPONSE_JSON)})) }) @GET @Path("containers/{" + CONTAINER_ID + "}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getContainerInfo( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id to be retrieved", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ); @ApiOperation(value="Disposes a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=DISPOSE_CONTAINER_RESPONSE_JSON)})) }) @DELETE @Path("containers/{" + CONTAINER_ID + "}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response disposeContainer( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id to be disposed (undeployed)", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ); @ApiOperation(value="Returns information about the KIE scanner used for automatic updates in a specified KIE container, if applicable.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_SCANNER_RESPONSE_JSON)})) }) @GET @Path("containers/{" + CONTAINER_ID + "}/scanner") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getScannerInfo( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id for scanner to be loaded", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id ); @ApiOperation(value="Starts or stops a KIE scanner that controls polling for updated KIE container deployments, if applicable.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=UPDATE_SCANNER_RESPONSE_JSON)})) }) @POST @Path("containers/{" + CONTAINER_ID + "}/scanner") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response updateScanner( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id for scanner to be updated", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id, 
            @ApiParam(value = "Scanner information given as KieScannerResource type", required = true, examples=@Example(value= {
                                     @ExampleProperty(mediaType=JSON, value=UPDATE_SCANNER_JSON),
                                     @ExampleProperty(mediaType=XML, value=UPDATE_SCANNER_XML)})) String resourcePayload ); @ApiOperation(value="Returns release ID information (group ID, artifact ID, version) for a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_RELEASE_ID_RESPONSE_JSON)})) }) @GET @Path("containers/{" + CONTAINER_ID + "}/release-id") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getReleaseId( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id that release id should be loaded from", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id); @ApiOperation(value="Updates release ID information (group ID, artifact ID, version) for a specified KIE container.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=UPDATE_RELEASE_RESPONSE_JSON)})) }) @POST @Path("containers/{" + CONTAINER_ID + "}/release-id") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response updateReleaseId( @Context HttpHeaders headers, 
            @ApiParam(value = "Container id that release id should be upgraded", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String id, 
            @ApiParam(value = "Release Id to be upgraded to as ReleaseId type", required = true, examples=@Example(value= {
                                   @ExampleProperty(mediaType=JSON, value=UPDATE_RELEASE_ID_JSON),
                                   @ExampleProperty(mediaType=XML, value=UPDATE_RELEASE_ID_XML)})) String releaseIdPayload,
            @ApiParam(value = "Determines whether active processes are aborted (reset) before updating when the server runs in development mode") @QueryParam("resetBeforeUpdate")  @DefaultValue("false") boolean resetBeforeUpdate); @ApiOperation(value="Returns information about the current state and configurations of the KIE Server.", response=ServiceResponse.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_SERVER_STATE_RESPONSE_JSON)})) }) @GET @Path("state") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getServerState(@Context HttpHeaders headers); @ApiOperation(value="Readiness check for KIE Server that indicates that server is fully booted and ready to accept requests", response=Void.class, code=200) @ApiResponses(value = { @ApiResponse(code = 503, message = "Service not yet available") }) @GET @Path("readycheck") @Produces({MediaType.TEXT_PLAIN}) Response readycheck(@Context HttpHeaders headers); @ApiOperation(value="Liveness check for KIE Server that validates both kie server and all extensions, optionally produces report", response=Message.class, code=200, responseContainer="List") @ApiResponses(value = { @ApiResponse(code = 503, message = "If any of the checks failed") }) @GET @Path("healthcheck") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response healthcheck(@Context HttpHeaders headers,
                             @ApiParam(value = "optional report flag to return detailed report of the check, defaults to false", required = false) @QueryParam("report")  @DefaultValue("false") boolean report);  }