---
title: "TimeRange"
url: "https://nov18-dev.movespot.fyi/apis/konnect-analytics-dashboards-2/versions/62158128-8b73-4a90-ae97-da37b5a2ea32/schemas/TimeRange"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-analytics-dashboards-2/versions/62158128-8b73-4a90-ae97-da37b5a2ea32.md

# TimeRange

The time range to query.

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: Konnect Analytics Dashboards
  version: 2.0.0
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
components:
  schemas:
    MetricsRelativeTimeRangeDtoV2:
      description: A duration representing a relative-to-now span of time. Generally
        the start time is floored to the requested granularity. Eg 7d from now,
        with 1day granularity initiated at 2024-01-08T17:11:00+05:00 will query
        for the time range from 2024-01-01T00:00:00+05:00 to
        2024-01-08T17:11:00+05:00. The exact start and end timestamps are
        returned in the result query in the meta.start and meta.end fields. If
        the granularity for the previous query was 1hour, it would query a time
        range from 2024-01-01T17:00:00+05:00 to 2024-01-08T17:11:00+05:00.
      type: object
      properties:
        tz:
          type: string
          default: Etc/UTC
        type:
          type: string
          enum:
            - relative
        time_range:
          type: string
          default: 1h
          enum:
            - 15m
            - 1h
            - 6h
            - 12h
            - 24h
            - 7d
            - 30d
            - current_week
            - current_month
            - previous_week
            - previous_month
      required:
        - type
        - time_range
      title: Relative time range
    MetricsAbsoluteTimeRangeDtoV2:
      description: A duration representing an exact start and end time.
      type: object
      properties:
        tz:
          type: string
          default: Etc/UTC
        type:
          type: string
          enum:
            - absolute
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
      required:
        - type
      title: Absolute time range
    TimeRange:
      description: The time range to query.
      default:
        type: relative
        time_range: 1h
      discriminator:
        propertyName: type
        mapping:
          relative: "#/components/schemas/MetricsRelativeTimeRangeDtoV2"
          absolute: "#/components/schemas/MetricsAbsoluteTimeRangeDtoV2"
      oneOf:
        - $ref: "#/components/schemas/MetricsRelativeTimeRangeDtoV2"
        - $ref: "#/components/schemas/MetricsAbsoluteTimeRangeDtoV2"
```
