| Time | Status | User Agent |  |
| :-- | :-- | :-- | :-- |
| Make a request to see history. |

#### URL Expired

The URL for this request expired after 30 days.

### Parameters

**date_range_start**  
`date-time`  
required  
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.

**date_range_end**  
`date-time`  
required  
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.

**meter_ids**  
`array of objects`  
required  
List of meters to get data for.

**meter_ids***  
ADD uuid

**interval**  
`string`  
enum  
Defaults to INTERVAL_15MIN  
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.

Allowed:  
`INTERVAL_15MIN`, `INTERVAL_1HR`

# Responses

``200      Returns list of meters, each with their own energy data.``

**meters**  
`array of objects`  
required  
**meters***  
`object`  
**meter_id**  
`uuid`  
required  
A unique identifier for the meter.

**intervals**  
`array of objects`  
required  
**intervals***  
`object`  
**start_time_utc**  
`date-time`  
required  
**end_time_utc**  
`date-time`  
required  
**energy_net_wh**  
`double | null`  
required  
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.

**energy_consumed_wh**  
`double | null`  
required  
Energy consumed from the grid as reported by the customer's meter (if provided by the utility).

**energy_generated_wh**  
`double | null`  
required  
Energy generated/exported to the grid as reported by the customer's meter (if provided by the utility).

``400
Returns 400 if the request is invalid. The response body will contain a detailed error message.
``

``429
Returns 429 if the request is rate limited. The response body will contain a detailed error message.
``

### Updated 11 months ago

---

### Example Request
```shell
curl --request POST \
     --url https://api.staging.leap.energy/v1.1/analytics/meter-interval-data \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '  
{  
  "interval": "INTERVAL_15MIN"  
}  
'  
```

### Example Response
```json
{
  "meters": [
    {
      "meter_id": "e859c532-7852-4d6e-9084-305aa78b496b",
      "intervals": [
        {
          "start_time_utc": "2022-12-30T12:00:00Z",
          "end_time_utc": "2022-12-30T12:15:00Z",
          "energy_net_wh": 207600,
          "energy_consumed_wh": 207600,
          "energy_generated_wh": 2100.5
        }
      ]
    }
  ]
}
```

### Updated 11 months ago

---
