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

{
  "id": "XQ6iChimlnTT-N04unfu1",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/bizlytics/query",
    "servers": [
      {
        "url": "https://app.amberflo.io/bizlytics/query"
      }
    ],
    "name": "Query analytics data with detailed time series",
    "description": "<p>Retrieves comprehensive analytics data with detailed time series information and filled data points.\nThis endpoint provides a complete time series view, filling gaps with appropriate values to ensure continuous data representation.</p>\n<p>Use this endpoint to:</p>\n<ul>\n<li>Generate complete time series data for charting and visualization</li>\n<li>Analyze trends with continuous data points</li>\n<li>Calculate aggregations across all time periods</li>\n<li>Export data for further analysis with consistent time intervals</li>\n</ul>\n<p>Returns detailed analytics including time groups, percentage changes, and forecast values when requested.\nSupports real-time queries for recent data and historical analysis with various aggregation options.</p>\n<p><strong>Important Note:</strong> This endpoint fills missing time periods with zeros or appropriate values, providing a complete time series suitable for visualization.</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 detailed analytics data with complete time series",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Detailed analytics query results with complete time series and percentage changes.",
            "customType": "bizlytics.common.DetailedAnalyticsQueryResult.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": "Detailed analytics data with enhanced metrics and percentage changes.",
                "modelRef": "#/components/schemas/bizlytics.common.DetailedAnalyticsClientMeter.out",
                "customType": "bizlytics.common.DetailedAnalyticsClientMeter.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": "Detailed time series data with percentage change information.",
                    "modelRef": "#/components/schemas/bizlytics.common.DetailedAnalyticsValues.out",
                    "customType": "bizlytics.common.DetailedAnalyticsValues.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": "percentageChange",
                        "kind": "optional",
                        "type": "array",
                        "description": "Percentage change from previous time period for each metric.",
                        "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": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "timeGroupsInSeconds",
                "kind": "optional",
                "type": "array",
                "description": "Complete list of time intervals in Unix timestamp seconds.",
                "example": "",
                "itemType": "integer",
                "customType": "integer[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/bizlytics.common.DetailedAnalyticsQueryResult.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": "GjXG1hVlhiBB1dK7eMigo",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/bizlytics/query \\\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": "qrya8e77HYeiqETy4h0MC",
          "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\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "8sT1k3tzg1gjJwYJ1Z6tG",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/bizlytics/query\")\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": "SsPLaj1bxQi6E0OXxWnhI",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/bizlytics/query\"\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": "GjXG1hVlhiBB1dK7eMigo"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successfully retrieved detailed analytics data with complete time series\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          \"percentageChange\": [\n            0\n          ]\n        }\n      ],\n      \"forecastValues\": [\n        {\n          \"timeInSeconds\": \"\",\n          \"values\": [\n            0\n          ]\n        }\n      ]\n    }\n  ],\n  \"timeGroupsInSeconds\": [\n    0\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": ""
    }
  ]
}