---
title: "VulnerabilityMetricsRelativeTimeRange"
url: "https://us-prod.jeffyongtaotang.com/apis/konnect-service-catalog-1/versions/cdbef9b7-686c-4189-bbc8-55c727a972e8/schemas/VulnerabilityMetricsRelativeTimeRange"
---

> Full API specification: https://us-prod.jeffyongtaotang.com/apis/konnect-service-catalog-1/versions/cdbef9b7-686c-4189-bbc8-55c727a972e8.md

# VulnerabilityMetricsRelativeTimeRange

A duration representing a relative-to-now span of time. The start time is floored to the requested granularity. The exact start and end timestamps are returned in the result query in the meta.start and meta.end fields. Example: 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.

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Konnect Service Catalog
  version: 1.3.0
servers:
  - url: https://us.api.konghq.com/v1
    description: United-States Production region
  - url: https://eu.api.konghq.com/v1
    description: Europe Production region
  - url: https://au.api.konghq.com/v1
    description: Australia Production region
  - url: https://me.api.konghq.com/v1
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v1
    description: India Production region
  - url: https://sg.api.konghq.com/v1
    description: Singapore Production region
components:
  schemas:
    VulnerabilityMetricsRelativeTimeRange:
      type: object
      description: >
        A duration representing a relative-to-now span of time.

        The start time is floored to the requested granularity.

        The exact start and end timestamps are returned in the result query in
        the meta.start and meta.end fields.

        Example:
          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.
      additionalProperties: false
      required:
        - type
        - time_range
      properties:
        tz:
          type: string
          description: >
            Time zone in IANA Time Zone Database format (e.g.,
            'America/New_York', 'Europe/London', 'Etc/UTC').

            Optional, defaults to UTC when unspecified.
          default: Etc/UTC
          example: America/Chicago
        type:
          type: string
          enum:
            - relative
        time_range:
          oneOf:
            - title: RelativeDayTimeRange
              type: string
              pattern: ^([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-9]{2}|3[0-5][0-9]|36[0-5])d$
              default: 30d
            - title: RelativeWeekTimeRange
              type: string
              pattern: ^([1-9]|[1-4][0-9]|5[0-2])w$
            - title: RelativeMonthTimeRange
              type: string
              pattern: ^([1-9]|1[0-2])mo$
            - title: RelativeYearTimeRange
              type: string
              enum:
                - 1y
            - title: RelativeReservedRange
              type: string
              enum:
                - current_week
                - current_month
                - previous_week
                - previous_month
```
