---
title: "MeterQueryRequest"
url: "https://nov18-dev.movespot.fyi/apis/konnect-metering-billing-dev-0/versions/530864ec-15ca-4e70-ac05-5fa12e38fbc9/schemas/MeterQueryRequest"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-metering-billing-dev-0/versions/530864ec-15ca-4e70-ac05-5fa12e38fbc9.md

# MeterQueryRequest

A meter query request.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Konnect Metering & Billing
  version: 0.0.1
servers:
  - url: https://us.api.konghq.com/v3
    description: United-States Production region
  - url: https://eu.api.konghq.com/v3
    description: Europe Production region
  - url: https://au.api.konghq.com/v3
    description: Australia Production region
  - url: https://me.api.konghq.com/v3
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v3
    description: India Production region
  - url: https://sg.api.konghq.com/v3
    description: Singapore Production region
components:
  schemas:
    QueryFilterStringMapItem:
      description: >-
        A query filter for an item in a string map attribute.

        Operators are mutually exclusive, only one operator is allowed at a
        time.
      type: object
      properties:
        exists:
          description: The attribute exists.
          type: boolean
        eq:
          description: The attribute equals the provided value.
          type: string
        neq:
          description: The attribute does not equal the provided value.
          type: string
        in:
          description: The attribute is one of the provided values.
          type: array
          items:
            type: string
          maxItems: 100
          minItems: 1
        nin:
          description: The attribute is not one of the provided values.
          type: array
          items:
            type: string
          maxItems: 100
          minItems: 1
        contains:
          description: The attribute contains the provided value.
          type: string
        ncontains:
          description: The attribute does not contain the provided value.
          type: string
        and:
          description: Combines the provided filters with a logical AND.
          type: array
          items:
            $ref: "#/components/schemas/QueryFilterString"
          maxItems: 10
          minItems: 1
        or:
          description: Combines the provided filters with a logical OR.
          type: array
          items:
            $ref: "#/components/schemas/QueryFilterString"
          maxItems: 10
          minItems: 1
      additionalProperties:
        not: {}
      maxProperties: 1
      minProperties: 1
      title: Query String Map Item Filter
    QueryFilterString:
      description: >-
        A query filter for a string attribute.

        Operators are mutually exclusive, only one operator is allowed at a
        time.
      type: object
      properties:
        eq:
          description: The attribute equals the provided value.
          type: string
        neq:
          description: The attribute does not equal the provided value.
          type: string
        in:
          description: The attribute is one of the provided values.
          type: array
          items:
            type: string
          maxItems: 100
          minItems: 1
        nin:
          description: The attribute is not one of the provided values.
          type: array
          items:
            type: string
          maxItems: 100
          minItems: 1
        contains:
          description: The attribute contains the provided value.
          type: string
        ncontains:
          description: The attribute does not contain the provided value.
          type: string
        and:
          description: Combines the provided filters with a logical AND.
          type: array
          items:
            $ref: "#/components/schemas/QueryFilterString"
          maxItems: 10
          minItems: 1
        or:
          description: Combines the provided filters with a logical OR.
          type: array
          items:
            $ref: "#/components/schemas/QueryFilterString"
          maxItems: 10
          minItems: 1
      additionalProperties:
        not: {}
      maxProperties: 1
      minProperties: 1
      title: Query String Filter
    MeterQueryRequest:
      description: A meter query request.
      type: object
      properties:
        from:
          description: The start of the period the usage is queried from.
          type: string
          format: date-time
          example: 2023-01-01T01:01:01.001Z
          title: RFC3339 Date-Time
        to:
          description: The end of the period the usage is queried to.
          type: string
          format: date-time
          example: 2023-01-01T01:01:01.001Z
          title: RFC3339 Date-Time
        granularity:
          description: |-
            The size of the time buckets to group the usage into.
            If not specified, the usage is aggregated over the entire period.
          type: string
          enum:
            - PT1M
            - PT1H
            - P1D
            - P1M
        time_zone:
          description: >-
            The value is the name of the time zone as defined in the IANA Time
            Zone Database (http://www.iana.org/time-zones).

            The time zone is used to determine the start and end of the time
            buckets.

            If not specified, the UTC timezone will be used.
          type: string
          default: UTC
        group_by_dimensions:
          description: The dimensions to group the results by.
          type: array
          items:
            type: string
          example:
            - model
            - type
          maxItems: 100
        filters:
          description: Filters to apply to the query.
          type: object
          properties:
            dimensions:
              description: >-
                Filters to apply to the dimensions of the query.

                For `subject` and `customer_id` only equals ("eq", "in")
                comparisons are supported.
              type: object
              additionalProperties:
                $ref: "#/components/schemas/QueryFilterStringMapItem"
              maxProperties: 10
      example:
        from: 2023-01-01T00:00:00Z
        to: 2023-01-02T00:00:00Z
        granularity: P1D
        time_zone: UTC
```
