---
title: "TimeRange"
url: "https://nov18-dev.movespot.fyi/apis/konnect-analytics-reports-dev-2/versions/370301af-a74b-40da-a34b-13e279afe451/schemas/TimeRange"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-analytics-reports-dev-2/versions/370301af-a74b-40da-a34b-13e279afe451.md

# TimeRange

The period of time to return data. Relative time ranges are relative to the current moment. Absolute time ranges specify an unchanging period of time. If not specified, a default relative timeframe of last 24 hours will be chosen.

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: Konnect Analytics Reports
  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:
    RelativeTimeRange:
      type: object
      properties:
        type:
          type: string
          enum:
            - RELATIVE
        time_period:
          description: Query data from the specified period relative to now.
          type: string
          enum:
            - 15M
            - 1H
            - 6H
            - 12H
            - 24H
            - 7D
            - 30D
            - CURRENT_WEEK
            - CURRENT_MONTH
            - PREVIOUS_WEEK
            - PREVIOUS_MONTH
      required:
        - type
        - time_period
    AbsoluteTimeRange:
      type: object
      properties:
        type:
          type: string
          enum:
            - ABSOLUTE
        start:
          description: An ISO-8601 date value specifying the lower bound of the time
            range, inclusive.
          type: string
          format: date
          example: 2022-11-04
        end:
          description: An ISO-8601 date value specifying the upper bound of the time
            range, inclusive.
          type: string
          format: date
          example: 2022-11-04
      required:
        - type
        - start
        - end
    TimeRange:
      description: >
        The period of time to return data.  Relative time ranges are relative to
        the current moment.  Absolute time ranges specify an unchanging period
        of time.  If not specified, a default relative timeframe of last 24
        hours will be chosen.
      default:
        type: RELATIVE
        time_period: 24H
      discriminator:
        propertyName: type
        mapping:
          relative: "#/components/schemas/RelativeTimeRange"
          absolute: "#/components/schemas/AbsoluteTimeRange"
      oneOf:
        - $ref: "#/components/schemas/RelativeTimeRange"
        - $ref: "#/components/schemas/AbsoluteTimeRange"
```
