CommcareReportService

public interface CommcareReportService

Responsible for interacting with CommCareHQ’s Report Metadata and Data API.

Methods

getReportById

ReportDataInfo getReportById(String reportId, String configName)

Query CommCareHQ for a report by its report id.

Parameters:
  • reportId – the id of the report on CommCareHQ
  • configName – the name of the configuration used for connecting to CommcareHQ, null means default configuration
Returns:

the ReportDataInfo object representing the state of the report data or null if that report does not exist.

getReportById

ReportDataInfo getReportById(String reportId)

Same as getReportById but uses default Commcare configuration.

getReportByIdWithFilters

ReportDataInfo getReportByIdWithFilters(String reportId, String configName, String filters)

Query CommCareHQ for a report by its report id and using filters declared in report.

Parameters:
  • reportId – the id of the report on CommCareHQ
  • configName – the name of the configuration used for connecting to CommcareHQ, null means default configuration
  • filters – the list of filters able to use in request
Returns:

the ReportDataInfo object representing the state of the report data or null if that report does not exist.

getReportsList

ReportsMetadataInfo getReportsList(String configName)

Query CommCareHQ for all reports.

Parameters:
  • configName – the name of the configuration used for connecting to CommcareHQ, null means default configuration
Returns:

ReportsMetadataInfo object that contains reports metadata and the list of ReportsMetadataInfo objects representing reports found on the given CommcareHQ configuration

getReportsList

ReportsMetadataInfo getReportsList()

Same as getReportsList(String) but uses default Commcare configuration.