> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getruba.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read Meter Quantities

> ### Intent

Reads the meter quantities without changing it.

### When to call it

Call this after your application has received or stored the identifier for the meter quantities.

### Access boundary

Authorize the request with a token that carries `meters:read` or `meters:write`.

### Successful result

A successful request returns `200`. The response schema below defines the body your integration receives.

export const RubaSocials = () => {
  if (typeof document === "undefined") {
    return null;
  }
  const inject = () => {
    const footer = document.getElementById("footer");
    if (!footer || document.getElementById("ruba-socials")) {
      return false;
    }
    const isDark = document.querySelector("html.dark") || document.querySelector('html[class*="dark"]');
    const lineColor = isDark ? "#383838" : "#e8e8ed";
    const iconColor = isDark ? "#8e8e93" : "#86868b";
    const markColor = isDark ? "#ffffff" : "#08080c";
    const hoverColor = "#0071e3";
    const div = document.createElement("div");
    div.id = "ruba-socials";
    div.style.cssText = `display:flex;align-items:center;gap:20px;padding-top:20px;margin-top:20px;border-top:1px solid ${lineColor};width:100%`;
    const logo = `<a href="https://getruba.com" style="display:inline-flex;height:24px;align-items:center;gap:8px;text-decoration:none;color:${markColor};line-height:1;"><svg width="24" height="24" viewBox="0 0 120 120" aria-hidden="true" style="display:block;flex:none;"><g transform="translate(2.5 0)"><path d="M19 25h59L65.43 47H19a4 4 0 0 1-4-4V29a4 4 0 0 1 4-4Z" fill="${markColor}"/><path d="M19 73h31.57L38 95H19a4 4 0 0 1-4-4V77a4 4 0 0 1 4-4Z" fill="${markColor}"/><path d="M85 25h25L70 95H45Z" fill="#007AFF"/></g></svg><span style="display:inline-flex;height:24px;align-items:center;font-weight:600;font-size:15px;color:${markColor};letter-spacing:-0.01em;line-height:1;">Ruba</span></a>`;
    const spacer = `<div style="flex:1"></div>`;
    const ig = `<a href="https://instagram.com/getruba" target="_blank" rel="noopener" aria-label="Instagram" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"/><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"/><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"/></svg></a>`;
    const li = `<a href="https://linkedin.com/company/getruba" target="_blank" rel="noopener" aria-label="LinkedIn" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"/><rect x="2" y="9" width="4" height="12"/><circle cx="4" cy="4" r="2"/></svg></a>`;
    const x = `<a href="https://x.com/getruba" target="_blank" rel="noopener" aria-label="X" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg></a>`;
    const github = `<a href="https://github.com/rubadot" target="_blank" rel="noopener" aria-label="GitHub" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 .7a11.5 11.5 0 0 0-3.64 22.4c.58.1.79-.25.79-.56v-2.24c-3.22.7-3.9-1.37-3.9-1.37-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.16.08 1.78 1.2 1.78 1.2 1.04 1.77 2.72 1.26 3.38.96.1-.75.4-1.26.74-1.55-2.57-.3-5.27-1.29-5.27-5.69 0-1.26.45-2.29 1.19-3.09-.12-.29-.52-1.47.11-3.05 0 0 .97-.31 3.16 1.18A10.96 10.96 0 0 1 12 6.09c.98 0 1.94.13 2.86.39 2.2-1.49 3.16-1.18 3.16-1.18.63 1.58.23 2.76.11 3.05.74.8 1.19 1.83 1.19 3.09 0 4.42-2.7 5.39-5.28 5.68.42.36.79 1.06.79 2.14v3.28c0 .31.21.67.8.56A11.5 11.5 0 0 0 12 .7Z"/></svg></a>`;
    div.innerHTML = logo + spacer + ig + li + x + github;
    footer.appendChild(div);
    return true;
  };
  if (!document.documentElement.dataset.rubaSocialsObserver) {
    document.documentElement.dataset.rubaSocialsObserver = "true";
    const observer = new MutationObserver(() => {
      if (!document.getElementById("ruba-socials")) {
        inject();
      }
    });
    observer.observe(document.body, {
      childList: true,
      subtree: true
    });
  }
  setTimeout(() => {
    if (!inject()) {
      const interval = setInterval(() => {
        if (inject()) {
          clearInterval(interval);
        }
      }, 500);
      setTimeout(() => clearInterval(interval), 10000);
    }
  }, 300);
  return null;
};

<link rel="stylesheet" href="/style.css" />

<RubaSocials />


## OpenAPI

````yaml get /v1/meters/{id}/quantities
openapi: 3.1.0
info:
  title: Ruba API
  summary: Ruba HTTP and Webhooks API
  description: '**Details:** Read the docs at https://docs.getruba.com/api-reference.'
  version: 2026-04
servers:
  - url: https://api.getruba.com
    description: '**Details:** Production environment.'
    x-speakeasy-server-id: production
  - url: https://sandbox-api.getruba.com
    description: '**Details:** Sandbox environment.'
    x-speakeasy-server-id: sandbox
security: []
tags:
  - name: public
    description: >-
      **Details:** Endpoints shown and documented in the Ruba API documentation
      and available in our SDKs.
  - name: private
    description: >-
      **Details:** Endpoints that should appear in the schema only in
      development to generate our internal JS SDK.
paths:
  /v1/meters/{id}/quantities:
    get:
      tags:
        - meters
        - public
      summary: Read Meter Quantities
      description: >-
        ### Intent


        Reads the meter quantities without changing it.


        ### When to call it


        Call this after your application has received or stored the identifier
        for the meter quantities.


        ### Access boundary


        Authorize the request with a token that carries `meters:read` or
        `meters:write`.


        ### Successful result


        A successful request returns `200`. The response schema below defines
        the body your integration receives.
      operationId: meters:quantities
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            description: Identifier of the meter.
            title: Id
          description: Identifier of the meter.
        - name: start_timestamp
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: '**Parameter:** Start timestamp.'
            title: Start Timestamp
          description: '**Parameter:** Start timestamp.'
        - name: end_timestamp
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: '**Parameter:** End timestamp.'
            title: End Timestamp
          description: '**Parameter:** End timestamp.'
        - name: interval
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/TimeInterval'
            description: '**Parameter:** Interval between two timestamps.'
          description: '**Parameter:** Interval between two timestamps.'
        - name: timezone
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            description: '**Parameter:** Timezone to use for the timestamps. Default is UTC.'
            enum:
              - Africa/Abidjan
              - Africa/Accra
              - Africa/Addis_Ababa
              - Africa/Algiers
              - Africa/Asmara
              - Africa/Asmera
              - Africa/Bamako
              - Africa/Bangui
              - Africa/Banjul
              - Africa/Bissau
              - Africa/Blantyre
              - Africa/Brazzaville
              - Africa/Bujumbura
              - Africa/Cairo
              - Africa/Casablanca
              - Africa/Ceuta
              - Africa/Conakry
              - Africa/Dakar
              - Africa/Dar_es_Salaam
              - Africa/Djibouti
              - Africa/Douala
              - Africa/El_Aaiun
              - Africa/Freetown
              - Africa/Gaborone
              - Africa/Harare
              - Africa/Johannesburg
              - Africa/Juba
              - Africa/Kampala
              - Africa/Khartoum
              - Africa/Kigali
              - Africa/Kinshasa
              - Africa/Lagos
              - Africa/Libreville
              - Africa/Lome
              - Africa/Luanda
              - Africa/Lubumbashi
              - Africa/Lusaka
              - Africa/Malabo
              - Africa/Maputo
              - Africa/Maseru
              - Africa/Mbabane
              - Africa/Mogadishu
              - Africa/Monrovia
              - Africa/Nairobi
              - Africa/Ndjamena
              - Africa/Niamey
              - Africa/Nouakchott
              - Africa/Ouagadougou
              - Africa/Porto-Novo
              - Africa/Sao_Tome
              - Africa/Timbuktu
              - Africa/Tripoli
              - Africa/Tunis
              - Africa/Windhoek
              - America/Adak
              - America/Anchorage
              - America/Anguilla
              - America/Antigua
              - America/Araguaina
              - America/Argentina/Buenos_Aires
              - America/Argentina/Catamarca
              - America/Argentina/ComodRivadavia
              - America/Argentina/Cordoba
              - America/Argentina/Jujuy
              - America/Argentina/La_Rioja
              - America/Argentina/Mendoza
              - America/Argentina/Rio_Gallegos
              - America/Argentina/Salta
              - America/Argentina/San_Juan
              - America/Argentina/San_Luis
              - America/Argentina/Tucuman
              - America/Argentina/Ushuaia
              - America/Aruba
              - America/Asuncion
              - America/Atikokan
              - America/Atka
              - America/Bahia
              - America/Bahia_Banderas
              - America/Barbados
              - America/Belem
              - America/Belize
              - America/Blanc-Sablon
              - America/Boa_Vista
              - America/Bogota
              - America/Boise
              - America/Buenos_Aires
              - America/Cambridge_Bay
              - America/Campo_Grande
              - America/Cancun
              - America/Caracas
              - America/Catamarca
              - America/Cayenne
              - America/Cayman
              - America/Chicago
              - America/Chihuahua
              - America/Ciudad_Juarez
              - America/Coral_Harbour
              - America/Cordoba
              - America/Costa_Rica
              - America/Coyhaique
              - America/Creston
              - America/Cuiaba
              - America/Curacao
              - America/Danmarkshavn
              - America/Dawson
              - America/Dawson_Creek
              - America/Denver
              - America/Detroit
              - America/Dominica
              - America/Edmonton
              - America/Eirunepe
              - America/El_Salvador
              - America/Ensenada
              - America/Fort_Nelson
              - America/Fort_Wayne
              - America/Fortaleza
              - America/Glace_Bay
              - America/Godthab
              - America/Goose_Bay
              - America/Grand_Turk
              - America/Grenada
              - America/Guadeloupe
              - America/Guatemala
              - America/Guayaquil
              - America/Guyana
              - America/Halifax
              - America/Havana
              - America/Hermosillo
              - America/Indiana/Indianapolis
              - America/Indiana/Knox
              - America/Indiana/Marengo
              - America/Indiana/Petersburg
              - America/Indiana/Tell_City
              - America/Indiana/Vevay
              - America/Indiana/Vincennes
              - America/Indiana/Winamac
              - America/Indianapolis
              - America/Inuvik
              - America/Iqaluit
              - America/Jamaica
              - America/Jujuy
              - America/Juneau
              - America/Kentucky/Louisville
              - America/Kentucky/Monticello
              - America/Knox_IN
              - America/Kralendijk
              - America/La_Paz
              - America/Lima
              - America/Los_Angeles
              - America/Louisville
              - America/Lower_Princes
              - America/Maceio
              - America/Managua
              - America/Manaus
              - America/Marigot
              - America/Martinique
              - America/Matamoros
              - America/Mazatlan
              - America/Mendoza
              - America/Menominee
              - America/Merida
              - America/Metlakatla
              - America/Mexico_City
              - America/Miquelon
              - America/Moncton
              - America/Monterrey
              - America/Montevideo
              - America/Montreal
              - America/Montserrat
              - America/Nassau
              - America/New_York
              - America/Nipigon
              - America/Nome
              - America/Noronha
              - America/North_Dakota/Beulah
              - America/North_Dakota/Center
              - America/North_Dakota/New_Salem
              - America/Nuuk
              - America/Ojinaga
              - America/Panama
              - America/Pangnirtung
              - America/Paramaribo
              - America/Phoenix
              - America/Port-au-Prince
              - America/Port_of_Spain
              - America/Porto_Acre
              - America/Porto_Velho
              - America/Puerto_Rico
              - America/Punta_Arenas
              - America/Rainy_River
              - America/Rankin_Inlet
              - America/Recife
              - America/Regina
              - America/Resolute
              - America/Rio_Branco
              - America/Rosario
              - America/Santa_Isabel
              - America/Santarem
              - America/Santiago
              - America/Santo_Domingo
              - America/Sao_Paulo
              - America/Scoresbysund
              - America/Shiprock
              - America/Sitka
              - America/St_Barthelemy
              - America/St_Johns
              - America/St_Kitts
              - America/St_Lucia
              - America/St_Thomas
              - America/St_Vincent
              - America/Swift_Current
              - America/Tegucigalpa
              - America/Thule
              - America/Thunder_Bay
              - America/Tijuana
              - America/Toronto
              - America/Tortola
              - America/Vancouver
              - America/Virgin
              - America/Whitehorse
              - America/Winnipeg
              - America/Yakutat
              - America/Yellowknife
              - Antarctica/Casey
              - Antarctica/Davis
              - Antarctica/DumontDUrville
              - Antarctica/Macquarie
              - Antarctica/Mawson
              - Antarctica/McMurdo
              - Antarctica/Palmer
              - Antarctica/Rothera
              - Antarctica/South_Pole
              - Antarctica/Syowa
              - Antarctica/Troll
              - Antarctica/Vostok
              - Arctic/Longyearbyen
              - Asia/Aden
              - Asia/Almaty
              - Asia/Amman
              - Asia/Anadyr
              - Asia/Aqtau
              - Asia/Aqtobe
              - Asia/Ashgabat
              - Asia/Ashkhabad
              - Asia/Atyrau
              - Asia/Baghdad
              - Asia/Bahrain
              - Asia/Baku
              - Asia/Bangkok
              - Asia/Barnaul
              - Asia/Beirut
              - Asia/Bishkek
              - Asia/Brunei
              - Asia/Calcutta
              - Asia/Chita
              - Asia/Choibalsan
              - Asia/Chongqing
              - Asia/Chungking
              - Asia/Colombo
              - Asia/Dacca
              - Asia/Damascus
              - Asia/Dhaka
              - Asia/Dili
              - Asia/Dubai
              - Asia/Dushanbe
              - Asia/Famagusta
              - Asia/Gaza
              - Asia/Harbin
              - Asia/Hebron
              - Asia/Ho_Chi_Minh
              - Asia/Hong_Kong
              - Asia/Hovd
              - Asia/Irkutsk
              - Asia/Istanbul
              - Asia/Jakarta
              - Asia/Jayapura
              - Asia/Jerusalem
              - Asia/Kabul
              - Asia/Kamchatka
              - Asia/Karachi
              - Asia/Kashgar
              - Asia/Kathmandu
              - Asia/Katmandu
              - Asia/Khandyga
              - Asia/Kolkata
              - Asia/Krasnoyarsk
              - Asia/Kuala_Lumpur
              - Asia/Kuching
              - Asia/Kuwait
              - Asia/Macao
              - Asia/Macau
              - Asia/Magadan
              - Asia/Makassar
              - Asia/Manila
              - Asia/Muscat
              - Asia/Nicosia
              - Asia/Novokuznetsk
              - Asia/Novosibirsk
              - Asia/Omsk
              - Asia/Oral
              - Asia/Phnom_Penh
              - Asia/Pontianak
              - Asia/Pyongyang
              - Asia/Qatar
              - Asia/Qostanay
              - Asia/Qyzylorda
              - Asia/Rangoon
              - Asia/Riyadh
              - Asia/Saigon
              - Asia/Sakhalin
              - Asia/Samarkand
              - Asia/Seoul
              - Asia/Shanghai
              - Asia/Singapore
              - Asia/Srednekolymsk
              - Asia/Taipei
              - Asia/Tashkent
              - Asia/Tbilisi
              - Asia/Tehran
              - Asia/Tel_Aviv
              - Asia/Thimbu
              - Asia/Thimphu
              - Asia/Tokyo
              - Asia/Tomsk
              - Asia/Ujung_Pandang
              - Asia/Ulaanbaatar
              - Asia/Ulan_Bator
              - Asia/Urumqi
              - Asia/Ust-Nera
              - Asia/Vientiane
              - Asia/Vladivostok
              - Asia/Yakutsk
              - Asia/Yangon
              - Asia/Yekaterinburg
              - Asia/Yerevan
              - Atlantic/Azores
              - Atlantic/Bermuda
              - Atlantic/Canary
              - Atlantic/Cape_Verde
              - Atlantic/Faeroe
              - Atlantic/Faroe
              - Atlantic/Jan_Mayen
              - Atlantic/Madeira
              - Atlantic/Reykjavik
              - Atlantic/South_Georgia
              - Atlantic/St_Helena
              - Atlantic/Stanley
              - Australia/ACT
              - Australia/Adelaide
              - Australia/Brisbane
              - Australia/Broken_Hill
              - Australia/Canberra
              - Australia/Currie
              - Australia/Darwin
              - Australia/Eucla
              - Australia/Hobart
              - Australia/LHI
              - Australia/Lindeman
              - Australia/Lord_Howe
              - Australia/Melbourne
              - Australia/NSW
              - Australia/North
              - Australia/Perth
              - Australia/Queensland
              - Australia/South
              - Australia/Sydney
              - Australia/Tasmania
              - Australia/Victoria
              - Australia/West
              - Australia/Yancowinna
              - Brazil/Acre
              - Brazil/DeNoronha
              - Brazil/East
              - Brazil/West
              - CET
              - CST6CDT
              - Canada/Atlantic
              - Canada/Central
              - Canada/Eastern
              - Canada/Mountain
              - Canada/Newfoundland
              - Canada/Pacific
              - Canada/Saskatchewan
              - Canada/Yukon
              - Chile/Continental
              - Chile/EasterIsland
              - Cuba
              - EET
              - EST
              - EST5EDT
              - Egypt
              - Eire
              - Etc/GMT
              - Etc/GMT+0
              - Etc/GMT+1
              - Etc/GMT+10
              - Etc/GMT+11
              - Etc/GMT+12
              - Etc/GMT+2
              - Etc/GMT+3
              - Etc/GMT+4
              - Etc/GMT+5
              - Etc/GMT+6
              - Etc/GMT+7
              - Etc/GMT+8
              - Etc/GMT+9
              - Etc/GMT-0
              - Etc/GMT-1
              - Etc/GMT-10
              - Etc/GMT-11
              - Etc/GMT-12
              - Etc/GMT-13
              - Etc/GMT-14
              - Etc/GMT-2
              - Etc/GMT-3
              - Etc/GMT-4
              - Etc/GMT-5
              - Etc/GMT-6
              - Etc/GMT-7
              - Etc/GMT-8
              - Etc/GMT-9
              - Etc/GMT0
              - Etc/Greenwich
              - Etc/UCT
              - Etc/UTC
              - Etc/Universal
              - Etc/Zulu
              - Europe/Amsterdam
              - Europe/Andorra
              - Europe/Astrakhan
              - Europe/Athens
              - Europe/Belfast
              - Europe/Belgrade
              - Europe/Berlin
              - Europe/Bratislava
              - Europe/Brussels
              - Europe/Bucharest
              - Europe/Budapest
              - Europe/Busingen
              - Europe/Chisinau
              - Europe/Copenhagen
              - Europe/Dublin
              - Europe/Gibraltar
              - Europe/Guernsey
              - Europe/Helsinki
              - Europe/Isle_of_Man
              - Europe/Istanbul
              - Europe/Jersey
              - Europe/Kaliningrad
              - Europe/Kiev
              - Europe/Kirov
              - Europe/Kyiv
              - Europe/Lisbon
              - Europe/Ljubljana
              - Europe/London
              - Europe/Luxembourg
              - Europe/Madrid
              - Europe/Malta
              - Europe/Mariehamn
              - Europe/Minsk
              - Europe/Monaco
              - Europe/Moscow
              - Europe/Nicosia
              - Europe/Oslo
              - Europe/Paris
              - Europe/Podgorica
              - Europe/Prague
              - Europe/Riga
              - Europe/Rome
              - Europe/Samara
              - Europe/San_Marino
              - Europe/Sarajevo
              - Europe/Saratov
              - Europe/Simferopol
              - Europe/Skopje
              - Europe/Sofia
              - Europe/Stockholm
              - Europe/Tallinn
              - Europe/Tirane
              - Europe/Tiraspol
              - Europe/Ulyanovsk
              - Europe/Uzhgorod
              - Europe/Vaduz
              - Europe/Vatican
              - Europe/Vienna
              - Europe/Vilnius
              - Europe/Volgograd
              - Europe/Warsaw
              - Europe/Zagreb
              - Europe/Zaporozhye
              - Europe/Zurich
              - Factory
              - GB
              - GB-Eire
              - GMT
              - GMT+0
              - GMT-0
              - GMT0
              - Greenwich
              - HST
              - Hongkong
              - Iceland
              - Indian/Antananarivo
              - Indian/Chagos
              - Indian/Christmas
              - Indian/Cocos
              - Indian/Comoro
              - Indian/Kerguelen
              - Indian/Mahe
              - Indian/Maldives
              - Indian/Mauritius
              - Indian/Mayotte
              - Indian/Reunion
              - Iran
              - Israel
              - Jamaica
              - Japan
              - Kwajalein
              - Libya
              - MET
              - MST
              - MST7MDT
              - Mexico/BajaNorte
              - Mexico/BajaSur
              - Mexico/General
              - NZ
              - NZ-CHAT
              - Navajo
              - PRC
              - PST8PDT
              - Pacific/Apia
              - Pacific/Auckland
              - Pacific/Bougainville
              - Pacific/Chatham
              - Pacific/Chuuk
              - Pacific/Easter
              - Pacific/Efate
              - Pacific/Enderbury
              - Pacific/Fakaofo
              - Pacific/Fiji
              - Pacific/Funafuti
              - Pacific/Galapagos
              - Pacific/Gambier
              - Pacific/Guadalcanal
              - Pacific/Guam
              - Pacific/Honolulu
              - Pacific/Johnston
              - Pacific/Kanton
              - Pacific/Kiritimati
              - Pacific/Kosrae
              - Pacific/Kwajalein
              - Pacific/Majuro
              - Pacific/Marquesas
              - Pacific/Midway
              - Pacific/Nauru
              - Pacific/Niue
              - Pacific/Norfolk
              - Pacific/Noumea
              - Pacific/Pago_Pago
              - Pacific/Palau
              - Pacific/Pitcairn
              - Pacific/Pohnpei
              - Pacific/Ponape
              - Pacific/Port_Moresby
              - Pacific/Rarotonga
              - Pacific/Saipan
              - Pacific/Samoa
              - Pacific/Tahiti
              - Pacific/Tarawa
              - Pacific/Tongatapu
              - Pacific/Truk
              - Pacific/Wake
              - Pacific/Wallis
              - Pacific/Yap
              - Poland
              - Portugal
              - ROC
              - ROK
              - Singapore
              - Turkey
              - UCT
              - US/Alaska
              - US/Aleutian
              - US/Arizona
              - US/Central
              - US/East-Indiana
              - US/Eastern
              - US/Hawaii
              - US/Indiana-Starke
              - US/Michigan
              - US/Mountain
              - US/Pacific
              - US/Samoa
              - UTC
              - Universal
              - W-SU
              - WET
              - Zulu
              - localtime
            default: UTC
            title: Timezone
          description: '**Parameter:** Timezone to use for the timestamps. Default is UTC.'
        - name: customer_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid4
                description: Identifier of the customer.
              - type: array
                items:
                  type: string
                  format: uuid4
                  description: Identifier of the customer.
              - type: 'null'
            title: CustomerID Filter
            description: Return only records matching customer ID.
          description: Return only records matching customer ID.
        - name: external_customer_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - items:
                  type: string
                type: array
              - type: 'null'
            title: ExternalCustomerID Filter
            description: Return only records matching external customer ID.
          description: Return only records matching external customer ID.
        - name: customer_aggregation_function
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/AggregationFunction'
              - type: 'null'
            description: >-
              **Parameter:** If set, will first compute the quantities per
              customer before aggregating them using the given function. If not
              set, the quantities will be aggregated across all events.
            title: Customer Aggregation Function
          description: >-
            **Parameter:** If set, will first compute the quantities per
            customer before aggregating them using the given function. If not
            set, the quantities will be aggregated across all events.
        - name: metadata
          in: query
          required: false
          style: deepObject
          schema:
            $ref: '#/components/schemas/MetadataQuery'
          description: >-
            Return only records matching metadata key-value pairs. It uses the
            `deepObject` style, e.g. `?metadata[key]=value`.
      responses:
        '200':
          description: Request completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeterQuantities'
        '404':
          description: '**Response:** Meter could not be found.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - oidc:
            - meters:read
            - meters:write
        - pat:
            - meters:read
            - meters:write
        - oat:
            - meters:read
            - meters:write
components:
  schemas:
    TimeInterval:
      type: string
      enum:
        - year
        - month
        - week
        - day
        - hour
      title: TimeInterval
    AggregationFunction:
      type: string
      enum:
        - count
        - sum
        - max
        - min
        - avg
        - unique
      title: AggregationFunction
    MetadataQuery:
      anyOf:
        - type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: boolean
              - items:
                  type: string
                type: array
              - type: array
                items:
                  type: integer
              - type: array
                items:
                  type: boolean
        - type: 'null'
      title: MetadataQuery
    MeterQuantities:
      properties:
        quantities:
          items:
            $ref: '#/components/schemas/MeterQuantity'
          type: array
          title: Quantities
        total:
          type: number
          title: Total
          description: '**Total:** Total quantity for the period.'
          examples:
            - 100
      type: object
      required:
        - quantities
        - total
      title: MeterQuantities
    ResourceNotFound:
      properties:
        error:
          type: string
          const: ResourceNotFound
          title: Error
          examples:
            - ResourceNotFound
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: ResourceNotFound
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MeterQuantity:
      properties:
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: '**Timestamp:** Timestamp for the current period.'
        quantity:
          type: number
          title: Quantity
          description: '**Quantity:** Quantity for the current period.'
          examples:
            - 10
      type: object
      required:
        - timestamp
        - quantity
      title: MeterQuantity
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    oidc:
      type: openIdConnect
      openIdConnectUrl: /.well-known/openid-configuration
    pat:
      type: http
      description: >-
        **Authentication:** You can generate a **Personal Access Token** from
        your [settings](https://getruba.com/settings).
      scheme: bearer
    oat:
      type: http
      description: >-
        **Authentication:** You can generate an **Organization Access Token**
        from your organization's settings.
      scheme: bearer

````