@Path("{report_key}/run")
@GET
@Produces(MediaType.APPLICATION_JSON)
public ReportResult run(@Context UriInfo uriInfo,
@PathParam("report_key") String reportKey) {
Report r = this.reportFactory.getReport(reportKey);
if (r == null) {
// TODO: Throw an appropriate exception once they are moved
// into candlepin-common.
throw new BadRequestException("Report " + reportKey + " not found.");
}
return r.run(uriInfo.getQueryParameters());
}