analyticsChartData

The analyticsChartData query in Bunny's GraphQL API, with its arguments, return type and an example request.

Scope required: standard:read

For a complete list of possible response fields see the AnalyticsChartData type.

query analyticsChartData ($dataSource: String!, $measures: [AnalyticsMeasureInput!]!, $dimension: String, $secondDimension: String, $dateRange: String, $entityId: ID, $startDate: String, $endDate: String, $accountId: ID, $fieldFilterKey: String, $fieldFilterValue: String, $fiscalYear: String, $fiscalMonth: String, $fiscalQuarter: String, $fiscalPreset: String, $includeCurrentMonth: Boolean, $fillDateGaps: Boolean, $labelIdField: String, $sortByValue: Boolean) {
  analyticsChartData (dataSource: $dataSource, measures: $measures, dimension: $dimension, secondDimension: $secondDimension, dateRange: $dateRange, entityId: $entityId, startDate: $startDate, endDate: $endDate, accountId: $accountId, fieldFilterKey: $fieldFilterKey, fieldFilterValue: $fieldFilterValue, fiscalYear: $fiscalYear, fiscalMonth: $fiscalMonth, fiscalQuarter: $fiscalQuarter, fiscalPreset: $fiscalPreset, includeCurrentMonth: $includeCurrentMonth, fillDateGaps: $fillDateGaps, labelIdField: $labelIdField, sortByValue: $sortByValue) {
    currencyId
  }
}

ArgumentsLink to Arguments section

Name Type Description
dataSource String Data source key
measures List (AnalyticsMeasureInput) Aggregations to compute
dimension String Group-by field, or “none” for ungrouped aggregate
secondDimension String Second group-by; produces one series per value (pivot)
dateRange String Date range preset
entityId ID Entity ID to scope data
startDate String Custom range start date (ISO 8601)
endDate String Custom range end date (ISO 8601)
accountId ID Account ID to scope data
fieldFilterKey String Field name to filter on
fieldFilterValue String Value to filter the field by
fiscalYear String Fiscal year to filter by
fiscalMonth String  
fiscalQuarter String Fiscal quarter to filter by
fiscalPreset String Relative fiscal period preset (e.g. thisFiscalQuarter)
includeCurrentMonth Boolean Include the current (partial) month in last-N-months ranges
fillDateGaps Boolean Emit a bucket for every month in the range (null where no data) so gaps show
labelIdField String Field key whose value is returned as label_ids (one per label)
sortByValue Boolean Order a single-dimension chart by its first measure, largest first

ResponseLink to Response section