---
title: Query analytics data with sparse time series
slug: reference/query-analytics-data-with-sparse-time-series
docTags: 
createdAt: 2025-10-13T16:37:16.778Z
---

{
  "id": "nrv35FlZR_6_c_LXIyn5l",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/bizlytics/query/sparse",
    "servers": [
      {
        "url": "https://app.amberflo.io/bizlytics/query/sparse"
      }
    ],
    "name": "Query analytics data with sparse time series",
    "description": "<p>Retrieves analytics data for meters and usage patterns without interpolating missing data points.\nThis endpoint returns a sparse time series, meaning gaps in usage are not filled with zero values, providing an accurate view of when actual usage occurred.</p>\n<p>Use this endpoint to:</p>\n<ul>\n<li>Get precise usage patterns without artificial zero-filling</li>\n<li>Analyze actual activity periods versus idle times</li>\n<li>Reduce data volume for intermittent usage patterns</li>\n<li>Generate more efficient reports for sporadic usage</li>\n</ul>\n<p>The sparse format is particularly useful for meters with intermittent activity, as it only returns data points when usage actually occurred.\nSupports various aggregation types including SUM, AVG, MAX, MIN, and COUNT across configurable time intervals.</p>\n<p><strong>Important Note:</strong> Unlike the standard query endpoint, this does not interpolate missing time periods, resulting in smaller response sizes for sparse data.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "bizlytics.common.AnalyticsQuery.in",
          "schema": [
            {
              "name": "objectType",
              "kind": "required",
              "type": "string",
              "description": "Type of analytics data to query. Determines available dimensions and data source.\n\n**Valid values:**\n- `\"usage_costs\"` - Query usage costs and revenue data with billing-related dimensions (customerId, productId, meterApiName, etc.)\n- `\"cost_item\"` - Query cost item analytics with cost-specific dimensions (costItemId, costItemName, etc.)\n\nBoth types support custom meter-defined dimensions for grouping and filtering.\n",
              "example": ""
            },
            {
              "name": "aggregation",
              "kind": "optional",
              "type": "string",
              "description": "Aggregation function. If not specified, the default is obtained from the associated meter definition.",
              "modelRef": "#/components/schemas/common.aggregation.AggregationType.in",
              "customType": "common.aggregation.AggregationType.in",
              "schema": []
            },
            {
              "name": "timeGroupingInterval",
              "kind": "optional",
              "type": "string",
              "description": "A usage query returns a time series of statistics. This field specifies the granularity of the time buckets in this series.\n\nNotice that for aggregation types: `MIN`, `MAX`, `AVG` this field has a more delicate meaning.\n\nFor example, for `AVG` if this field value is an `HOUR`, then you get the hourly average usage value for each group and a breakdown of each hour usage.\n\nOn the other hand if this field is a `DAY` then you get the average of the total daily usage, with a breakdown of the total usage per day.\n",
              "modelRef": "#/components/schemas/common.aggregation.AggregationInterval.in",
              "customType": "common.aggregation.AggregationInterval.in",
              "schema": []
            },
            {
              "name": "timeRange",
              "kind": "optional",
              "type": "object",
              "description": "Time period for which to compute the usage.",
              "modelRef": "#/components/schemas/bizlytics.common.TimeRange.in",
              "customType": "bizlytics.common.TimeRange.in",
              "schema": [
                {
                  "name": "startTimeInSeconds",
                  "kind": "required",
                  "type": "integer<int64>",
                  "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                  "example": 0
                },
                {
                  "name": "endTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to \"now\".",
                  "example": 0
                }
              ]
            },
            {
              "name": "filter",
              "kind": "optional",
              "type": "map",
              "description": "`where` clause for the usage query. Each entry is a dimension and a list of values to filter for.\",\n\nValid filters are:\n- `customerId`\n- Any dimension defined in for the meter, see the [Meter API](ref:post_meters).\n- `tags:<tagId>`\n\nDifferent filters are combined using logical `AND` operator while different filter values for a given key are combined using logic `OR` operator.\n\nTags can be specified in filters using the prefix `tags:`. For example,\n\n1. `tags:stage = [prod, dev]` will filter usage by all customer having tag `stage.prod` **or** `stage.dev`\n2. `tags:stage = [prod], tags:region = [us-west]` will filter usage by customers having tags `stage.prod` **and** `region.us-west-2`.",
              "example": "",
              "customType": "map<string, string[]>",
              "schema": []
            },
            {
              "name": "dimensions",
              "kind": "optional",
              "type": "map",
              "description": "Filters the usage data by the dimensions. Each entry is a dimension and a list of values to filter for.\n\nValid values are:\n- Any dimension defined in for the meter, see the [Meter API](ref:post_meters).",
              "example": "",
              "customType": "map<string, string[]>",
              "schema": []
            },
            {
              "name": "filterByTags",
              "kind": "optional",
              "type": "map",
              "description": "The `filterByTags` field allows you to filter the usage cost based on the tags associated with objects, such as meters.\n\nNote: `filterByTags` takes precedence over the meterApiName in `filter`. The meters associated with the tags will override the meterApiName provided in the `filter`.\n \n- Logical AND Operator: Different tags are combined using the logical AND operator. This means that the result will include objects that match all specified tags.\n- Logical OR Operator: Within a single tag, multiple values are combined using the logical OR operator. This means that the result will include objects that match any of the specified values for a given tag.\n\nTags can be specified in the following format:\n\nFor instance this filterByTags\n```\n\"filterByTags\": {\n    \"tagKey1\" : {\n        \"meter\": [\"tagValue1\", \"tagValue2\"]\n    },\n    \"tagKey2\": {\n        \"meter\": [\"tagValue3\", \"tagValue4\"]\n    }\n }\n```\n\nmeans that you want to filter by:\n```\nmeters having tag with key `key1` and value `val1` **or** `val2` **and** tag with key `key2` and value `val3` **or** `val4`\n```\n\n\n- filterByTags: The main key used to specify the tags to filter by.\n- tagKey: The key representing the tag you want to filter by (e.g., \"environment\", \"region\", etc.).\n - meter: Represents the object type you are filtering. In this case, it's used to filter by meters that have the given tag.\n- tagValue1, tagValue2: The values of the tag that you want to filter by. These values are combined using the OR operator. \n",
              "example": "",
              "customType": "map<string, bizlytics.common.TagFilterValues.in>",
              "schema": []
            },
            {
              "name": "groupBy",
              "kind": "optional",
              "type": "array",
              "description": "Group the usage data by these group keys. If unspecified or empty, data will be aggregated for the meter as a whole.\n\nValid values are:\n- `customerId`\n- Any dimension defined in for the meter, see the [Meter API](ref:post_meters) under dimensions.",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "page",
              "kind": "optional",
              "type": "object",
              "description": "Pagination parameters for controlling result set size and navigation.",
              "modelRef": "#/components/schemas/bizlytics.common.AnalyticsQuery.Page.in",
              "customType": "bizlytics.common.AnalyticsQuery.Page.in",
              "schema": [
                {
                  "name": "number",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "description": "Page number that was retrieved, starting from 1.",
                  "example": 0
                },
                {
                  "name": "size",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "description": "Number of records returned in this page.",
                  "example": 0
                }
              ]
            },
            {
              "name": "limit",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "",
              "example": 0
            },
            {
              "name": "sort",
              "kind": "optional",
              "type": "object",
              "description": "Sorting configuration that was applied to the query results.",
              "modelRef": "#/components/schemas/bizlytics.common.AnalyticsQuery.Sort.in",
              "customType": "bizlytics.common.AnalyticsQuery.Sort.in",
              "schema": [
                {
                  "name": "isAscending",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "Sort direction where true indicates ascending order.",
                  "example": ""
                },
                {
                  "name": "sortBy",
                  "kind": "optional",
                  "type": "array",
                  "description": "Fields that were used for sorting in order of precedence.",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                }
              ]
            },
            {
              "name": "usageItems",
              "kind": "optional",
              "type": "array",
              "description": "Which metrics to include in the result.",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "summaryOnly",
              "kind": "optional",
              "type": "boolean",
              "description": "Set to false to only compute the group totals and omit the values time series.",
              "example": ""
            },
            {
              "name": "forecast",
              "kind": "optional",
              "type": "object",
              "description": "Forecast future usage. Currently, it uses a linear model.",
              "modelRef": "#/components/schemas/bizlytics.common.ForecastOptions.in",
              "customType": "bizlytics.common.ForecastOptions.in",
              "schema": [
                {
                  "name": "startTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to the end time of the historical usage.",
                  "example": 0
                },
                {
                  "name": "endTimeInSeconds",
                  "kind": "required",
                  "type": "integer<int64>",
                  "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                  "example": 0
                }
              ]
            },
            {
              "name": "realTime",
              "kind": "optional",
              "type": "boolean",
              "description": "",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/bizlytics.common.AnalyticsQuery.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successfully retrieved sparse analytics data without gap interpolation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Sparse analytics query results without gap interpolation.",
            "customType": "bizlytics.common.AnalyticsQueryResult.out",
            "schema": [
              {
                "name": "query",
                "kind": "optional",
                "type": "object",
                "description": "Echo of the original query parameters used.",
                "modelRef": "#/components/schemas/bizlytics.common.AnalyticsQuery.out",
                "customType": "bizlytics.common.AnalyticsQuery.out",
                "schema": [
                  {
                    "name": "objectType",
                    "kind": "required",
                    "type": "string",
                    "description": "The analytics object type",
                    "example": ""
                  },
                  {
                    "name": "accountId",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "aggregation",
                    "kind": "optional",
                    "type": "string",
                    "description": "Aggregation function. If not specified, the default is obtained from the associated meter definition.",
                    "modelRef": "#/components/schemas/common.aggregation.AggregationType.in",
                    "customType": "common.aggregation.AggregationType.in",
                    "schema": []
                  },
                  {
                    "name": "timeGroupingInterval",
                    "kind": "optional",
                    "type": "string",
                    "description": "A usage query returns a time series of statistics. This field specifies the granularity of the time buckets in this series.\n\nNotice that for aggregation types: `MIN`, `MAX`, `AVG` this field has a more delicate meaning.\n\nFor example, for `AVG` if this field value is an `HOUR`, then you get the hourly average usage value for each group and a breakdown of each hour usage.\n\nOn the other hand if this field is a `DAY` then you get the average of the total daily usage, with a breakdown of the total usage per day.\n",
                    "modelRef": "#/components/schemas/common.aggregation.AggregationInterval.in",
                    "customType": "common.aggregation.AggregationInterval.in",
                    "schema": []
                  },
                  {
                    "name": "timeRange",
                    "kind": "optional",
                    "type": "object",
                    "description": "Time period for which to compute the usage.",
                    "modelRef": "#/components/schemas/bizlytics.common.TimeRange.in",
                    "customType": "bizlytics.common.TimeRange.in",
                    "schema": [
                      {
                        "name": "startTimeInSeconds",
                        "kind": "required",
                        "type": "integer<int64>",
                        "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                        "example": 0
                      },
                      {
                        "name": "endTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to \"now\".",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "filter",
                    "kind": "optional",
                    "type": "map",
                    "description": "`where` clause for the usage query. Each entry is a dimension and a list of values to filter for.\",\n\nValid filters are:\n- `customerId`\n- Any dimension defined in for the meter, see the [Meter API](ref:post_meters).\n- `tags:<tagId>`\n\nDifferent filters are combined using logical `AND` operator while different filter values for a given key are combined using logic `OR` operator.\n\nTags can be specified in filters using the prefix `tags:`. For example,\n\n1. `tags:stage = [prod, dev]` will filter usage by all customer having tag `stage.prod` **or** `stage.dev`\n2. `tags:stage = [prod], tags:region = [us-west]` will filter usage by customers having tags `stage.prod` **and** `region.us-west-2`.",
                    "example": "",
                    "customType": "map<string, string[]>",
                    "schema": []
                  },
                  {
                    "name": "dimensions",
                    "kind": "optional",
                    "type": "map",
                    "description": "Filters the usage data by the dimensions. Each entry is a dimension and a list of values to filter for.\n\nValid values are:\n- Any dimension defined in for the meter, see the [Meter API](ref:post_meters).",
                    "example": "",
                    "customType": "map<string, string[]>",
                    "schema": []
                  },
                  {
                    "name": "filterByTags",
                    "kind": "optional",
                    "type": "map",
                    "description": "The `filterByTags` field allows you to filter the usage cost based on the tags associated with objects, such as meters.\n\nNote: `filterByTags` takes precedence over the meterApiName in `filter`. The meters associated with the tags will override the meterApiName provided in the `filter`.\n \n- Logical AND Operator: Different tags are combined using the logical AND operator. This means that the result will include objects that match all specified tags.\n- Logical OR Operator: Within a single tag, multiple values are combined using the logical OR operator. This means that the result will include objects that match any of the specified values for a given tag.\n\nTags can be specified in the following format:\n\nFor instance this filterByTags\n```\n\"filterByTags\": {\n    \"tagKey1\" : {\n        \"meter\": [\"tagValue1\", \"tagValue2\"]\n    },\n    \"tagKey2\": {\n        \"meter\": [\"tagValue3\", \"tagValue4\"]\n    }\n }\n```\n\nmeans that you want to filter by:\n```\nmeters having tag with key `key1` and value `val1` **or** `val2` **and** tag with key `key2` and value `val3` **or** `val4`\n```\n\n\n- filterByTags: The main key used to specify the tags to filter by.\n- tagKey: The key representing the tag you want to filter by (e.g., \"environment\", \"region\", etc.).\n - meter: Represents the object type you are filtering. In this case, it's used to filter by meters that have the given tag.\n- tagValue1, tagValue2: The values of the tag that you want to filter by. These values are combined using the OR operator. \n",
                    "example": "",
                    "customType": "map<string, bizlytics.common.TagFilterValues.in>",
                    "schema": []
                  },
                  {
                    "name": "groupBy",
                    "kind": "optional",
                    "type": "array",
                    "description": "Group the usage data by these group keys. If unspecified or empty, data will be aggregated for the meter as a whole.\n\nValid values are:\n- `customerId`\n- Any dimension defined in for the meter, see the [Meter API](ref:post_meters) under dimensions.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "page",
                    "kind": "optional",
                    "type": "object",
                    "description": "Pagination parameters for controlling result set size and navigation.",
                    "modelRef": "#/components/schemas/bizlytics.common.AnalyticsQuery.Page.in",
                    "customType": "bizlytics.common.AnalyticsQuery.Page.in",
                    "schema": [
                      {
                        "name": "number",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "Page number that was retrieved, starting from 1.",
                        "example": 0
                      },
                      {
                        "name": "size",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "Number of records returned in this page.",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "limit",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 0
                  },
                  {
                    "name": "sort",
                    "kind": "optional",
                    "type": "object",
                    "description": "Sorting configuration that was applied to the query results.",
                    "modelRef": "#/components/schemas/bizlytics.common.AnalyticsQuery.Sort.in",
                    "customType": "bizlytics.common.AnalyticsQuery.Sort.in",
                    "schema": [
                      {
                        "name": "isAscending",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "Sort direction where true indicates ascending order.",
                        "example": ""
                      },
                      {
                        "name": "sortBy",
                        "kind": "optional",
                        "type": "array",
                        "description": "Fields that were used for sorting in order of precedence.",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  },
                  {
                    "name": "usageItems",
                    "kind": "optional",
                    "type": "array",
                    "description": "Which metrics to include in the result.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "summaryOnly",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Set to false to only compute the group totals and omit the values time series.",
                    "example": ""
                  },
                  {
                    "name": "forecast",
                    "kind": "optional",
                    "type": "object",
                    "description": "Forecast future usage. Currently, it uses a linear model.",
                    "modelRef": "#/components/schemas/bizlytics.common.ForecastOptions.in",
                    "customType": "bizlytics.common.ForecastOptions.in",
                    "schema": [
                      {
                        "name": "startTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to the end time of the historical usage.",
                        "example": 0
                      },
                      {
                        "name": "endTimeInSeconds",
                        "kind": "required",
                        "type": "integer<int64>",
                        "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "realTime",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "",
                    "example": ""
                  }
                ]
              },
              {
                "name": "pageMetadata",
                "kind": "optional",
                "type": "object",
                "description": "Pagination information for the result set.",
                "modelRef": "#/components/schemas/bizlytics.common.PageMetadata.out",
                "customType": "bizlytics.common.PageMetadata.out",
                "schema": [
                  {
                    "name": "pageNumber",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "Current page number in the result set.",
                    "example": 0
                  },
                  {
                    "name": "pageSize",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "Number of records returned in this page.",
                    "example": 0
                  },
                  {
                    "name": "totalPages",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "Total number of pages available in the result set.",
                    "example": 0
                  },
                  {
                    "name": "totalRecords",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "Total number of records across all pages.",
                    "example": 0
                  }
                ]
              },
              {
                "name": "usageItems",
                "kind": "optional",
                "type": "array",
                "description": "List of usage metrics included in the response.",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "analytics",
                "kind": "optional",
                "type": "array",
                "description": "Analytics data grouped by the specified dimensions.",
                "modelRef": "#/components/schemas/bizlytics.common.AnalyticsClientMeter.out",
                "customType": "bizlytics.common.AnalyticsClientMeter.out[]",
                "schema": [
                  {
                    "name": "group",
                    "kind": "optional",
                    "type": "object",
                    "description": "Grouping keys and their values for this analytics result.",
                    "modelRef": "#/components/schemas/bizlytics.common.group.GroupKey.out",
                    "customType": "bizlytics.common.group.GroupKey.out",
                    "schema": [
                      {
                        "name": "amberfloDimensions",
                        "kind": "optional",
                        "type": "map",
                        "description": "System-defined dimensions such as customerId for grouping.",
                        "example": "",
                        "customType": "map<string, string>",
                        "schema": []
                      },
                      {
                        "name": "dimensions",
                        "kind": "optional",
                        "type": "map",
                        "description": "User-defined dimensions from meter configuration for grouping.",
                        "example": "",
                        "customType": "map<string, string>",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "groupValues",
                    "kind": "optional",
                    "type": "array",
                    "description": "Aggregated values for the entire group across the time range.",
                    "example": "",
                    "itemType": "number",
                    "customType": "number[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "values",
                    "kind": "optional",
                    "type": "array",
                    "description": "Time series data points containing usage values at specific timestamps.",
                    "modelRef": "#/components/schemas/bizlytics.common.AnalyticsValues.out",
                    "customType": "bizlytics.common.AnalyticsValues.out[]",
                    "schema": [
                      {
                        "name": "timeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "Unix timestamp in seconds for this data point.",
                        "example": 0
                      },
                      {
                        "name": "values",
                        "kind": "optional",
                        "type": "array",
                        "description": "Metric values at this timestamp for each usage item.",
                        "example": "",
                        "itemType": "number",
                        "customType": "number[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  },
                  {
                    "name": "forecastValues",
                    "kind": "optional",
                    "type": "array",
                    "description": "Predicted future values based on historical usage patterns.",
                    "modelRef": "#/components/schemas/bizlytics.common.AnalyticsValues.out",
                    "customType": "bizlytics.common.AnalyticsValues.out[]",
                    "schema": [
                      {
                        "name": "timeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "Unix timestamp in seconds for this data point.",
                        "example": 0
                      },
                      {
                        "name": "values",
                        "kind": "optional",
                        "type": "array",
                        "description": "Metric values at this timestamp for each usage item.",
                        "example": "",
                        "itemType": "number",
                        "customType": "number[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/bizlytics.common.AnalyticsQueryResult.out",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid query parameters or unsupported aggregation type",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Authentication required or invalid API key",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Insufficient permissions to access analytics data",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Requested meter or analytics object not found",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal server error occurred while processing the query",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "FFSGK2vfO8POhgOaNFl5p",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/bizlytics/query/sparse \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"objectType\": \"\",\n     \"timeRange\": {\n     \"startTimeInSeconds\": 0\n     },\n     \"forecast\": {\n     \"endTimeInSeconds\": 0\n     }\n     }'"
        },
        {
          "id": "cKDJkJIYH3qlmhCLqASDL",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"objectType\": \"\",\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   },\n   \"forecast\": {\n      \"endTimeInSeconds\": 0\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/bizlytics/query/sparse\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Lj4FoidDRVLupJQRaogo_",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/bizlytics/query/sparse\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"objectType\": \"\",\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   },\n   \"forecast\": {\n      \"endTimeInSeconds\": 0\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "UqvEi_hAK2m3MKek4iZZe",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/bizlytics/query/sparse\"\n\npayload = json.dumps({\n   \"objectType\": \"\",\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   },\n   \"forecast\": {\n      \"endTimeInSeconds\": 0\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "FFSGK2vfO8POhgOaNFl5p"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successfully retrieved sparse analytics data without gap interpolation\n{\n  \"query\": {\n    \"objectType\": \"\",\n    \"accountId\": \"\",\n    \"aggregation\": \"\",\n    \"timeGroupingInterval\": \"\",\n    \"timeRange\": {\n      \"startTimeInSeconds\": \"\",\n      \"endTimeInSeconds\": \"\"\n    },\n    \"filter\": \"\",\n    \"dimensions\": \"\",\n    \"filterByTags\": \"\",\n    \"groupBy\": [\n      \"\"\n    ],\n    \"page\": {\n      \"number\": \"\",\n      \"size\": \"\"\n    },\n    \"limit\": \"\",\n    \"sort\": {\n      \"isAscending\": false,\n      \"sortBy\": [\n        \"\"\n      ]\n    },\n    \"usageItems\": [\n      \"\"\n    ],\n    \"summaryOnly\": false,\n    \"forecast\": {\n      \"startTimeInSeconds\": \"\",\n      \"endTimeInSeconds\": \"\"\n    },\n    \"realTime\": false\n  },\n  \"pageMetadata\": {\n    \"pageNumber\": \"\",\n    \"pageSize\": \"\",\n    \"totalPages\": \"\",\n    \"totalRecords\": \"\"\n  },\n  \"usageItems\": [\n    \"\"\n  ],\n  \"analytics\": [\n    {\n      \"group\": {\n        \"amberfloDimensions\": \"\",\n        \"dimensions\": \"\"\n      },\n      \"groupValues\": [\n        0\n      ],\n      \"values\": [\n        {\n          \"timeInSeconds\": \"\",\n          \"values\": [\n            0\n          ]\n        }\n      ],\n      \"forecastValues\": [\n        {\n          \"timeInSeconds\": \"\",\n          \"values\": [\n            0\n          ]\n        }\n      ]\n    }\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid query parameters or unsupported aggregation type\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Authentication required or invalid API key\n"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Insufficient permissions to access analytics data\n"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Requested meter or analytics object not found\n"
        },
        {
          "id": "response-5-500",
          "language": "500",
          "code": "// Internal server error occurred while processing the query\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}