provider Account usage (beta) GET /api/v2/usage/serverside-contexts
@utdk/launchdarkly /api/v2/usage/serverside-contexts
Get contexts serverside 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 counts reflect data reported by server-side SDKs.<br/><br/>The supported granularity varies by aggregation type. The maximum time range is 365 days.
from query
The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
string
to query
The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
string
projectKey query
A project key to filter results by. Can be specified multiple times, one query parameter per project key.
string
environmentKey query
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.
string
contextKind query
A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.
string
sdkName query
An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
string
anonymous query
An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.<br/>Valid values: `true`, `false`.
string
groupBy query
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`, `sdkAppId`, `anonymousV2`.
string
aggregationType query
Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
string
granularity query
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.
string

Try it

Authentication
Configure credentials for LaunchDarkly REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

getcontextsserversideusage
GET/api/v2/usage/serverside-contexts
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 counts reflect data reported by server-side SDKs.<br/><br/>The supported granularity varies by aggregation type. The maximum time range is 365 days.

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

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

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

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.

A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.

An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.

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

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`, `sdkAppId`, `anonymousV2`.

Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.

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.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import launchdarkly from '@utdk/launchdarkly';

await launchdarkly.getcontextsserversideusage()