Kong · Schema

CreateMeterRequest

Meter create request.

API GatewayAI GatewayAI ConnectivityAgent GatewayEvent GatewayMCP RegistryService MeshLLMKafkaKonnectOpen Source

Properties

Name Type Description
name string Display name of the resource. Between 1 and 256 characters.
description string Optional description of the resource. Maximum 1024 characters.
labels object
key object
aggregation string The aggregation type to use for the meter.
event_type string The event type to include in the aggregation.
events_from string The date since the meter should include events. Useful to skip old events. If not specified, all historical events are included.
value_property string JSONPath expression to extract the value from the ingested event's data property. The ingested value for sum, avg, min, and max aggregations is a number or a string that can be parsed to a number. For
dimensions object Named JSONPath expressions to extract the group by values from the event data. Keys must be unique and consist only alphanumeric and underscore characters.
View JSON Schema on GitHub

JSON Schema

kong-createmeterrequest-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CreateMeterRequest",
  "title": "CreateMeterRequest",
  "description": "Meter create request.",
  "type": "object",
  "properties": {
    "name": {
      "description": "Display name of the resource.\n\nBetween 1 and 256 characters.",
      "type": "string",
      "maxLength": 256,
      "minLength": 1
    },
    "description": {
      "description": "Optional description of the resource.\n\nMaximum 1024 characters.",
      "type": "string",
      "maxLength": 1024
    },
    "labels": {
      "$ref": "#/components/schemas/Labels"
    },
    "key": {
      "$ref": "#/components/schemas/ResourceKey"
    },
    "aggregation": {
      "description": "The aggregation type to use for the meter.",
      "type": "string",
      "enum": [
        "sum",
        "count",
        "unique_count",
        "avg",
        "min",
        "max",
        "latest"
      ],
      "x-speakeasy-unknown-values": "allow"
    },
    "event_type": {
      "description": "The event type to include in the aggregation.",
      "type": "string",
      "example": "prompt",
      "minLength": 1
    },
    "events_from": {
      "description": "The date since the meter should include events.\nUseful to skip old events.\nIf not specified, all historical events are included.",
      "type": "string",
      "format": "date-time",
      "example": "2023-01-01T01:01:01.001Z",
      "title": "RFC3339 Date-Time"
    },
    "value_property": {
      "description": "JSONPath expression to extract the value from the ingested event's data property.\n\nThe ingested value for sum, avg, min, and max aggregations is a number or a string that can be parsed to a number.\n\nFor unique_count aggregation, the ingested value must be a string. For count aggregation the value_property is ignored.",
      "type": "string",
      "example": "$.tokens",
      "minLength": 1
    },
    "dimensions": {
      "description": "Named JSONPath expressions to extract the group by values from the event data.\n\nKeys must be unique and consist only alphanumeric and underscore characters.",
      "type": "object",
      "example": {
        "type": "$.type"
      },
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "required": [
    "name",
    "key",
    "aggregation",
    "event_type"
  ]
}