v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Account usage (beta)

Get events usage

Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.

get/api/v2/usage/events/{type}

Path parameters

typestring string required

The type of event to retrieve. Must be either received or published.

The type of event to retrieve. Must be either received or published.

Query parameters

fromstring string

The series of data returned starts from this timestamp. Defaults to 24 hours ago.

The series of data returned starts from this timestamp. Defaults to 24 hours ago.

tostring string

The series of data returned ends at this timestamp. Defaults to the current time.

The series of data returned ends at this timestamp. Defaults to the current time.

Response

Usage response

_linksobject required

The location and content type of related resources

metadataSeriesMetadataRep[] required

Metadata about each series

seriesSeriesTimeSliceRep[] required

An array of data points with timestamps. Each element of the array is an object with a 'time' field, whose value is the timestamp, and one or more key fields. If there are multiple key fields, they are labeled '0', '1', and so on, and are explained in the <code>metadata</code>.

Example response

{
  "series": [
    {
      "0": 11,
      "1": 15,
      "time": 1677888000000
    }
  ]
}