---
updatedAt: 2025-08-27T20:59:21.000Z
agentTools:
  projectIndex: https://developer.leap.energy/llms.txt
---

# List aggregated intervals

Lists all aggregated energy data in the given date range. Data is gap-filled - in case a utility doesn't send Leap some of the interval data, we predict it based on past data. You can request up to 1000000 data points at once. In case you hit this limit, the API will return a 400 response code. This can be solved either by reducing the amount of days or the amount of meters you're requesting data for.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "description": "Endpoints to get interval and performance data from Leap's API.",
    "title": "Analyze",
    "version": "1.1.0"
  },
  "servers": [
    {
      "description": "Leap staging API",
      "url": "https://api.staging.leap.energy"
    },
    {
      "description": "Leap production API",
      "url": "https://api.leap.energy"
    }
  ],
  "security": [
    {
      "Bearer": []
    }
  ],
  "tags": [
    {
      "name": "interval data"
    }
  ],
  "paths": {
    "/v1.1/analytics/aggregated-interval-data": {
      "post": {
        "description": "Lists all aggregated energy data in the given date range. Data is gap-filled - in case a utility doesn't send Leap some of the interval data, we predict it based on past data. You can request up to 1000000 data points at once. In case you hit this limit, the API will return a 400 response code. This can be solved either by reducing the amount of days or the amount of meters you're requesting data for.",
        "operationId": "listAggregatedIntervals",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntervalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AggregatedIntervalResponse"
                }
              }
            },
            "description": "Returns a list of aggregated energy data."
          },
          "400": {
            "description": "Returns 400 if the request is invalid. The response body will contain a detailed error message."
          },
          "429": {
            "description": "Returns 429 if the request is rate limited. The response body will contain a detailed error message."
          }
        },
        "summary": "List aggregated intervals",
        "tags": [
          "interval data"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "MeterId": {
        "description": "A unique identifier for the meter.",
        "example": "e859c532-7852-4d6e-9084-305aa78b496b",
        "format": "uuid",
        "type": "string"
      },
      "Interval": {
        "default": "INTERVAL_15MIN",
        "description": "Interval of the data. Leap supports `INTERVAL_15MIN` and `INTERVAL_1HR` for now and we default to `INTERVAL_15MIN`. For 1-hour intervals, we roll up 15-min intervals and average the wh values. If we don't have exactly 4 15-min intervals to roll up into an hour worth of data, we simply ignore that entire hour.",
        "enum": [
          "INTERVAL_15MIN",
          "INTERVAL_1HR"
        ],
        "type": "string"
      },
      "AggregatedInterval": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EnergyInterval"
          }
        ],
        "description": "Aggregated (summed) energy data for a specific interval across multiple meters.",
        "properties": {
          "number_of_meters": {
            "description": "Total number of meters for which we have energy data for this interval.",
            "example": 100,
            "format": "int32",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "number_of_meters"
        ],
        "type": "object"
      },
      "AggregatedIntervalResponse": {
        "properties": {
          "intervals": {
            "items": {
              "$ref": "#/components/schemas/AggregatedInterval"
            },
            "type": "array"
          }
        },
        "required": [
          "intervals"
        ],
        "type": "object"
      },
      "IntervalRequest": {
        "properties": {
          "date_range_start": {
            "description": "ISO-8601 timestamp of the first date to include in the results. This timestamp is inclusive, as opposed to `date_range_end`, which is exclusive. If an interval _starts_ in the given date/time range, it will be included in the results. Note that there is a maximum of 31 days between `date_range_start` and `date_range_end` as the response might otherwise become too large.",
            "example": "2022-11-10T14:00:00Z",
            "format": "date-time",
            "type": "string"
          },
          "date_range_end": {
            "description": "ISO-8601 timestamp of the last date to include in the results. This timestamp is exclusive, as opposed to `date_range_start`, which is inclusive. If an interval _starts_ in the given date/time range, it will be included in the results. Note that there is a maximum of 31 days between `date_range_start` and `date_range_end` as the response might otherwise become too large.",
            "example": "2022-11-11T14:00:00Z",
            "format": "date-time",
            "type": "string"
          },
          "meter_ids": {
            "description": "List of meters to get data for.",
            "example": [
              "e859c532-7852-4d6e-9084-305aa78b496b"
            ],
            "items": {
              "$ref": "#/components/schemas/MeterId"
            },
            "type": "array",
            "uniqueItems": true
          },
          "interval": {
            "$ref": "#/components/schemas/Interval"
          }
        },
        "required": [
          "date_range_end",
          "date_range_start",
          "meter_ids"
        ],
        "type": "object"
      },
      "EnergyInterval": {
        "properties": {
          "start_time_utc": {
            "example": "2022-12-30T12:00:00Z",
            "format": "date-time",
            "type": "string"
          },
          "end_time_utc": {
            "example": "2022-12-30T12:15:00Z",
            "format": "date-time",
            "type": "string"
          },
          "energy_net_wh": {
            "description": "The net energy value is always set. Sometimes utilities send us additional `consumed` vs `generated` energy data, in which case `consumed` minus `generated` equals `net` energy.",
            "example": 207600,
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "energy_consumed_wh": {
            "description": "Energy consumed from the grid as reported by the customer's meter (if provided by the utility).",
            "example": 207600,
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "energy_generated_wh": {
            "description": "Energy generated/exported to the grid as reported by the customer's meter (if provided by the utility).",
            "example": 2100.5,
            "format": "double",
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "end_time_utc",
          "energy_consumed_wh",
          "energy_generated_wh",
          "energy_net_wh",
          "start_time_utc"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "Bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```