Interface StatisticsExportService

All Known Implementing Classes:
StatisticsExportServiceImpl

public interface StatisticsExportService
  • Method Details

    • getCSV

      String getCSV(StatisticsProvider provider, String resourceId, Instant from, Instant to, DataResolution dataResolution, ElasticsearchIndex index, ZoneId zoneId) throws SearchIndexException, UnauthorizedException, NotFoundException
      Get a CSV representation for the query result based on the given parameters.
      Parameters:
      provider - The provider to get the data from.
      resourceId - The id of the resource to get the data for.
      from - The start date of the time range to get the data for.
      to - The end date of the time range to get the data for.
      dataResolution - The data resolution.
      index - The index to get event or series meta data from.
      zoneId - The ZoneId to use for date formatting.
      Returns:
      The data as CSV.
      Throws:
      SearchIndexException - If the search index cannot be queried.
      UnauthorizedException - If the user is not authorized to get the desired data.
      NotFoundException - If the resource identified by resourceId could not be found.
    • getCSV

      String getCSV(StatisticsProvider provider, String resourceId, Instant from, Instant to, DataResolution dataResolution, ElasticsearchIndex index, ZoneId zoneId, boolean fullMetadata, DetailLevel detailLevel, int limit, int offset, Map<String,String> filters) throws SearchIndexException, UnauthorizedException, NotFoundException
      Get a CSV representation for the query result based on the given parameters.
      Parameters:
      provider - The provider to get the data from.
      resourceId - The id of the resource to get the data for.
      from - The start date of the time range to get the data for.
      to - The end date of the time range to get the data for.
      dataResolution - The data resolution.
      index - The index to get event or series meta data from.
      zoneId - The ZoneId to use for date formatting.
      fullMetadata - When true, creates a full export with all available meta data fields.
      limit - limit to use for pagination. Pass 0 for unlimited (not recommeded).
      offset - offset to use for pagination.
      filters - filters to apply when searching for events/series.
      Returns:
      The data as CSV.
      Throws:
      SearchIndexException - If the search index cannot be queried.
      UnauthorizedException - If the user is not authorized to get the desired data.
      NotFoundException - If the resource identified by resourceId could not be found.