Interface Reports
- All Known Implementing Classes:
ReportsImpl
Backed by the Reports v1 API at /v1/reportCenter/reports. Generated reports are
listed, retrieved, downloaded and deleted; scheduled report definitions can be listed, created,
fetched, updated and deleted; and the available report definitions can be enumerated.
-
Method Summary
Modifier and TypeMethodDescriptiondeleteReports(List<String> reportIds) Deletes generated reports in bulk.booleandeleteScheduledReports(List<String> scheduledIds) Deletes scheduled report definitions in bulk.byte[]downloadReport(String reportId) Downloads a single generated report's file.byte[]downloadReports(List<String> reportIds) Downloads one or more generated reports as a combined file (zip).generateReport(String scheduledId) Generates a report from a scheduled report definition.getReportById(String reportId) Retrieves a generated report by id.getReportDefinition(String reportName) Retrieves a single report definition by name.Lists the available report definitions.Lists generated reports.getReports(Integer durationDays, List<ReportStatus> statuses, List<ReportSort> sorts) Lists generated reports with the spec's optional filters.getScheduledReport(String scheduledId) Retrieves a scheduled report by id.List<? extends ScheduledReport> Lists scheduled report definitions.scheduleReport(ScheduleReportRequest request) Creates a scheduled report definition.updateScheduledReport(String scheduledId, ScheduleReportRequest request) Updates an existing scheduled report definition.
-
Method Details
-
getReports
PaginatedList<Report> getReports()Lists generated reports.Maps to
GET /v1/reportCenter/reports(getReports).- Returns:
- a paginated list of reports
-
getReports
PaginatedList<Report> getReports(Integer durationDays, List<ReportStatus> statuses, List<ReportSort> sorts) Lists generated reports with the spec's optional filters.Maps to
GET /v1/reportCenter/reports(getReports) withduration,statusesandsorts. Lists are sent comma-separated (collectionFormat: csv); anullor empty argument is not sent and the service default applies (7 days, all statuses,-GENERATED_DATE).- Parameters:
durationDays- number of days back to search, 1 to 365, ornullstatuses- report statuses to include (IN_PROGRESS,SUCCESS,ERRORin the spec), ornullsorts- sort order, ornull- Returns:
- a paginated list of reports
- Throws:
IllegalArgumentException- ifdurationDaysis outside 1..365 or a status isUNKNOWN
-
getReportById
-
deleteReports
Deletes generated reports in bulk.Maps to
DELETE /v1/reportCenter/reports(deleteReports). This is a best-effort bulk delete: the response carries one result per requested report id, each with areportIdand a per-reportstatus(SUCCESSorERROR), so callers can detect partial failures.- Parameters:
reportIds- the report ids to delete- Returns:
- the per-report delete results
-
downloadReports
-
downloadReport
Downloads a single generated report's file.Maps to
GET /v1/reportCenter/reports/{reportId}/file(downloadReport).- Parameters:
reportId- the report id- Returns:
- the report file bytes
-
getScheduledReports
List<? extends ScheduledReport> getScheduledReports()Lists scheduled report definitions.Maps to
GET /v1/reportCenter/reports/scheduler(getScheduledReports).- Returns:
- the list of scheduled reports
-
getScheduledReport
Retrieves a scheduled report by id.Maps to
GET /v1/reportCenter/reports/scheduler/{scheduledId}(getScheduledReport).- Parameters:
scheduledId- the scheduled report id- Returns:
- the matching scheduled report
-
scheduleReport
Creates a scheduled report definition.Maps to
POST /v1/reportCenter/reports/scheduler(scheduleReport).- Parameters:
request- the schedule request body- Returns:
- the created scheduled report
-
updateScheduledReport
Updates an existing scheduled report definition.Maps to
PUT /v1/reportCenter/reports/scheduler/{scheduledId}(updateScheduledReport).- Parameters:
scheduledId- the scheduled report idrequest- the updated schedule request body- Returns:
- the updated scheduled report
-
deleteScheduledReports
-
generateReport
-
getReportDefinitions
List<ReportDefinitionJson> getReportDefinitions()Lists the available report definitions.Maps to
GET /v1/reportCenter/reports/definitions(getReportDefinitions).- Returns:
- the list of report definitions
-
getReportDefinition
Retrieves a single report definition by name.Maps to
GET /v1/reportCenter/reports/definitions/{reportName}(getReportDefinition).- Parameters:
reportName- the report definition name- Returns:
- the matching report definition
-