Skip to main content

Get emission calculation metrics

Query Parameters
fromstringdate

The start date of the custom date range. Defaults to 30 days ago if not specified.


throughstringdate

The to (inclusive) date of the custom date range. Defaults to the current date if not specified.


intervalenum

The time interval over which metrics should be aggregated. Defaults to day if not specified.

Enum:
  • day
  • month

all_accountsboolean

When true, metrics will include data from all accounts in the organisation. When false, metrics will only include data from the API Key's default account. Defaults to false.

Returns
timeseriesarray of objectrequired

A timeseries representing counters.

  • GET /analytics/emission-calculations
  • curl 'https://api.lune.co/v1/analytics/emission-calculations' \
      -H 'Authorization: Bearer <API_KEY>'
  • Response
  • {
      "timeseries": [
        [
          {
            "date": "2022-06-25",
            "count": 500
          },
          {
            "date": "2022-06-26",
            "count": 550
          },
          {
            "date": "2022-06-27",
            "count": 800
          }
        ]
      ]
    }