Get contexts total usage

Get a detailed time series of the number of context key usages observed by LaunchDarkly in your account, including non-primary context kinds. Use this for breakdowns that go beyond the primary-only aggregation of MAU endpoints.

The supported granularity varies by aggregation type. The maximum time range is 365 days.

Authentication

Authorizationstring
API Key authentication via header

Query parameters

fromstringOptional

The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.

tostringOptional

The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.

projectKeystringOptional
A project key to filter results by. Can be specified multiple times, one query parameter per project key.
environmentKeystringOptional

An environment key to filter results by. If specified, exactly one projectKey must be provided. Can be specified multiple times, one query parameter per environment key.

contextKindstringOptional
A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.
sdkNamestringOptional
An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
sdkTypestringOptional
An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.
anonymousstringOptional

An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: true, false.

groupBystringOptional
If specified, returns data for each distinct value of the given field. `contextKind` is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.<br/>Valid values: `projectId`, `environmentId`, `sdkName`, `sdkType`, `sdkAppId`, `anonymousV2`.
aggregationTypestringOptional

Specifies the aggregation method. Defaults to month_to_date.
Valid values: month_to_date, incremental, rolling_30d.

granularitystringOptional

Specifies the data granularity. Defaults to daily. Valid values depend on aggregationType: month_to_date supports daily and monthly; incremental and rolling_30d support daily only.

Response

Usage response
metadatalist of maps from strings to any
Metadata about each series
serieslist of maps from strings to integers

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 metadata.

Errors