Interval Data Upload (API)

Some programs (e.g. device-level DSGS, CPS, & Connected Solutions programs) require interval data to be uploaded so that Leap can calculate baselines and performance, and submit this data to program administrators for revenue payments.

This guide covers uploading interval data directly through the Leap API — an alternative to the SFTP upload option. Check out the Interval Data Upload Guide in the Leap Knowledge Center for details on the required CSV format and schema.

Automating interval data upload through the API can be very beneficial for operations and data accuracy, as this data needs to be provided ongoing throughout the year or program season. Uploading data more frequently (e.g. daily) is recommended, as this allows for quicker insights into event performance and, when applicable, quicker resolution of issues that may be negatively impacting performance.

Recommended Automation Steps

Upload workflow

  1. Call the Upload interval data endpoint with your CSV file contents to start ingestion
    1. Use the load schema for uploading kWh energy usage data — see the Interval Data Upload Guide in the Knowledge Center for the required CSV format
    2. The response includes a job_id used to track the upload
  2. Call the List upload job statuses endpoint with the job_id to check progress until it reaches COMPLETED or FAILED
  3. If FAILED, call the List data validation errors endpoint with the job_id to understand why
    1. Log failure reasons and alert the required team in order to make necessary corrections to the data
      1. See the Data validations performed section below for a list of data checks performed
    2. Fix the issues and re-upload the entire file

Missing intervals workflow

Rather than only uploading on a schedule, you can also use the API to detect gaps in what Leap has already received and fill them proactively.

  1. Call the Search for missing interval data endpoint to find intervals Leap doesn't yet have for your meters
    1. Newly submitted intervals show as PENDING and can take up to 48 hours to be fully processed and removed from the results — no action needed for these
    2. Intervals in OPEN status are missing and need to be submitted
  2. Set up an automated process to periodically query this endpoint filtering on OPEN status
    1. If the data is available internally, upload it using the Upload workflow above
    2. If the data is not available, alert the appropriate team to the missing data
📘

Unresponsive meters workflow

After interval data is submitted, Leap calculates baselines and performance, and measures responsiveness of a meter. It is recommended to query the unresponsive meters endpoint in order to alert on and investigate any meter that NEVER_RESPONDS or RARELY_RESPONDS.

Check out the Performance Diagnostics Guide (portal credentials required) for more details on reviewing unresponsive meter data in the portal or API.

Data Validations Performed

If a file doesn't meet these criteria below, you'll find the exact reason why it failed in the failed folder on the SFTP server, as mentioned above

ColumnValidation
meter_idShould be a valid/existing Leap meter UUID
meter_idIs created through the Create Meters API or Portal CSV upload (utility authorized meters are not supported)
meter_idThe meter must be within your partner account (and not another Leap partner) at the time of upload and also for the times you are submitting interval data for
interval_start_time_utc and interval_end_time_utcShould be valid ISO-8601 timestamps
interval_start_time_utc and interval_end_time_utcAre in the past
interval_start_time_utc and interval_end_time_utcShould be a 15-min time window
interval_start_time_utc and interval_end_time_utcMust be no older than two years
energy_consumed_kwh, energy_generated_kwhIf provided, should be a parseable positive number
energy_net_kwh, energy_consumed_kwh, energy_generated_kwhIf all three are present, consumed minus generated should equal net
finalIf provided, is either true or false
regionIf provided, is 2 characters all-alpha, all-caps

Did this page help you?