v47

latestOpenAPI 3.1.0raw.githubusercontent.com2025-11-064829.2 KB
API Metering

Meter an API response

Meter an API response

post/v2/apis/responses

Request body

transactionIdstring required

A client-supplied unique identifier used to correlate request and response pairs across /meter/v2/apis/requests and /meter/v2/apis/response endpoints. Must be consistent between related API calls to ensure proper usage tracking and analytics.

totalDurationinteger

The total duration of the request processing in milliseconds

responseCodeinteger required

The HTTP status code of the response

responseMessageSizeinteger

The size of the response message in bytes

contentTypestring

The content type of the request

backendLatencynumber double

The latency introduced by backend services in milliseconds

gatewayLatencynumber double

The latency introduced by the gateway in milliseconds

Example request

{
  "transactionId": "123e4567-e89b-12d3-a456-426614174000",
  "totalDuration": 1500,
  "responseCode": 200,
  "responseMessageSize": 1024,
  "contentType": "application/json",
  "backendLatency": 1200,
  "gatewayLatency": 50
}

Response

API response successfully metered

objectstring required

Type of the object, typically 'metering'

labelstring required

A descriptive label for the metering response

createdstring

ISO8601 formatted timestamp when the response was created

updatedstring

ISO8601 formatted timestamp when the response was last updated

idstring required

Unique identifier for the metering response

signaturestring required

Signature used for validating the response data

_linksLinks

Example response

{
  "object": "metering",
  "label": "Metering Response",
  "created": "2025-03-02T15:04:05Z",
  "updated": "2025-03-02T15:04:06Z",
  "id": "abc123",
  "signature": "signature123"
}