code: @DELETE
      @Produces(MediaType.APPLICATION_JSON)
      @Path("/{batchId}")
      @Description("Deletes the batch having the given ID.")
      public Response deleteBatch(@Context HttpServletRequest req,
                                      @PathParam("batchId") String batchId) {
          _validateBatchId(batchId);
          PrincipalUser currentOwner = validateAndGetOwner(req, null);
  
          BatchMetricQuery batch = batchService.findBatchById(batchId);
          if (batch != null) {
              PrincipalUser actualOwner = userService.findUserByUsername(batch.getOwnerName());
              validateResourceAuthorization(req, actualOwner, currentOwner);
              batchService.deleteBatch(batchId);
              return Response.status(Response.Status.OK).build();
          }
          throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);
      }
docs: Deletes the batch having the given ID.
  
  @param   req          HTTPServlet request. Cannot be null.
  @param   batchId      The batch ID to retrieve.
  
  @return  An empty body if the delete was successful.
  
  @throws  WebApplicationException  If an error occurs.