Ingest metering events
Changed onIngests an event or batch of events following the CloudEvents specification.
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
Request body
Metering event following the CloudEvents specification.
Identifies the event.
Identifies the context in which an event happened.
The version of the CloudEvents specification which the event uses.
Contains a value describing the type of event related to the originating occurrence.
Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP.
Identifies the schema that data adheres to.
Describes the subject of the event in the context of the event producer (identified by source).
Timestamp of when the occurrence happened. Must adhere to RFC 3339.
The event payload. Optional, if present it must be a JSON object.
Example request
{
"specversion": "1.0",
"id": "5c10fade-1c9e-4d6c-8275-c52c36731d3c",
"source": "service-name",
"type": "prompt",
"subject": "customer-id",
"time": "2023-01-01T01:01:01.001Z",
"data": {
"prompt": "Hello, world!",
"tokens": 100,
"model": "gpt-4o",
"type": "input"
}
}Response
The events have been ingested and are being processed asynchronously.
Changes
- breaking
added to the
invalid_parameters/itemsresponse propertyoneOflist for the response status - warning
added the new
key_invalidenum value to theinvalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/ruleresponse property for the response status - warning
added the new
uniqueenum value to theinvalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/ruleresponse property for the response status
- breaking