Kong · Schema

Relative time range

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.

API GatewayAI GatewayAI ConnectivityAgent GatewayEvent GatewayMCP RegistryService MeshLLMKafkaKonnectOpen Source

Properties

Name Type Description
tz string
type string
time_range string
View JSON Schema on GitHub

JSON Schema

kong-metricsrelativetimerangedtov2-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/MetricsRelativeTimeRangeDtoV2",
  "title": "Relative time range",
  "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"
      ],
      "x-speakeasy-unknown-values": "allow"
    }
  },
  "required": [
    "type",
    "time_range"
  ]
}