Account usage (beta)

This feature is in beta

To use this feature, pass in a header including the LD-API-Version key with value set to beta. Use this header with each call. To learn more, read Beta resources.

Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.

The account usage API lets you query for metrics about how your account is using LaunchDarkly. To learn more, read Account usage metrics.

Each endpoint returns time-series data in the form of an array of data points with timestamps. Each one contains data for that time from one or more series. It also includes a metadata array describing what each of the series is.

Get data export events usage

Get a time-series array of the number of monthly data export events from your account. The granularity is always daily, with a maximum of 31 days.

Request
query Parameters
from
string <string>

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

to
string <string>

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

projectKey
string <string>

A project key. If specified, environmentKey is required and results apply to the corresponding environment in this project.

environmentKey
string <string>

An environment key. If specified, projectKey is required and results apply to the corresponding environment in this project.

Responses
200

Usage response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

503

Service unavailable

get/api/v2/usage/data-export-events
Request samples
Response samples
application/json
{
  • "series": [
    ],
  • "_links": {
    }
}

Get evaluations 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.

Request
path Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

featureFlagKey
required
string <string>

The feature flag key

query Parameters
from
string <string>

The series of data returned starts from this timestamp. Defaults to 30 days ago.

to
string <string>

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

tz
string <string>

The timezone to use for breaks between days when returning daily data.

Responses
200

Usage response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "metadata": [
    ],
  • "series": [
    ]
}

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.

Request
path Parameters
type
required
string <string>

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

query Parameters
from
string <string>

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

to
string <string>

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

Responses
200

Usage response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/usage/events/{type}
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "metadata": [
    ],
  • "series": [
    ]
}

Get experimentation keys usage

Get a time-series array of the number of monthly experimentation keys from your account. The granularity is always daily, with a maximum of 31 days.

Request
query Parameters
from
string <string>

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

to
string <string>

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

projectKey
string <string>

A project key. If specified, environmentKey is required and results apply to the corresponding environment in this project.

environmentKey
string <string>

An environment key. If specified, projectKey is required and results apply to the corresponding environment in this project.

Responses
200

Usage response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

503

Service unavailable

get/api/v2/usage/experimentation-keys
Request samples
Response samples
application/json
{
  • "series": [
    ],
  • "_links": {
    }
}

Get experimentation units usage

Get a time-series array of the number of monthly experimentation units from your account. The granularity is always daily, with a maximum of 31 days.

Request
query Parameters
from
string <string>

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

to
string <string>

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

projectKey
string <string>

A project key. If specified, environmentKey is required and results apply to the corresponding environment in this project.

environmentKey
string <string>

An environment key. If specified, projectKey is required and results apply to the corresponding environment in this project.

Responses
200

Usage response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

503

Service unavailable

get/api/v2/usage/experimentation-units
Request samples
Response samples
application/json
{
  • "series": [
    ],
  • "_links": {
    }
}

Get MAU usage

Get a time-series array of the number of monthly active users (MAU) seen by LaunchDarkly from your account. The granularity is always daily.

Endpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read Account usage metrics.

Request
query Parameters
from
string <string>

The series of data returned starts from this timestamp. Defaults to 30 days ago.

to
string <string>

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

project
string <string>

A project key to filter results to. Can be specified multiple times, one query parameter per project key, to view data for multiple projects.

environment
string <string>

An environment key to filter results to. When using this parameter, exactly one project key must also be set. Can be specified multiple times as separate query parameters to view data for multiple environments within a single project.

sdktype
string <string>

An SDK type to filter results to. Can be specified multiple times, one query parameter per SDK type. Valid values: client, server

sdk
string <string>

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

anonymous
string <string>

If specified, filters results to either anonymous or nonanonymous users.

groupby
string <string>

If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions (for example, to group by both project and SDK). Valid values: project, environment, sdktype, sdk, anonymous

Responses
200

Usage response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

get/api/v2/usage/mau
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "metadata": [
    ],
  • "series": [
    ]
}

Get MAU usage by category

Get time-series arrays of the number of monthly active users (MAU) seen by LaunchDarkly from your account, broken down by the category of users. The category is either browser, mobile, or backend.

Endpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read Account usage metrics.

Request
query Parameters
from
string <string>

The series of data returned starts from this timestamp. Defaults to 30 days ago.

to
string <string>

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

Responses
200

Usage response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/usage/mau/bycategory
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "metadata": [
    ],
  • "series": [
    ]
}

Get MAU SDKs by type

Get a list of SDKs. These are all of the SDKs that have connected to LaunchDarkly by monthly active users (MAU) in the requested time period.

Endpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read Account usage metrics.

Request
query Parameters
from
string <string>

The data returned starts from this timestamp. Defaults to seven days ago. The timestamp is in Unix milliseconds, for example, 1656694800000.

to
string <string>

The data returned ends at this timestamp. Defaults to the current time. The timestamp is in Unix milliseconds, for example, 1657904400000.

sdktype
string <string>

The type of SDK with monthly active users (MAU) to list. Must be either client or server.

Responses
200

MAU SDKs response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

get/api/v2/usage/mau/sdks
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "sdks": [
    ]
}

Get service connection usage

Get a time-series array of the number of monthly service connections from your account. The granularity is always daily, with a maximum of 31 days.

Request
query Parameters
from
string <string>

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

to
string <string>

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

projectKey
string <string>

A project key. If specified, environmentKey is required and results apply to the corresponding environment in this project.

environmentKey
string <string>

An environment key. If specified, projectKey is required and results apply to the corresponding environment in this project.

Responses
200

Usage response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

503

Service unavailable

get/api/v2/usage/service-connections
Request samples
Response samples
application/json
{
  • "series": [
    ],
  • "_links": {
    }
}

Get stream usage

Get a time-series array of the number of streaming connections to LaunchDarkly in each time period. 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.

Request
path Parameters
source
required
string <string>

The source of streaming connections to describe. Must be either client or server.

query Parameters
from
string <string>

The series of data returned starts from this timestamp. Defaults to 30 days ago.

to
string <string>

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

tz
string <string>

The timezone to use for breaks between days when returning daily data.

Responses
200

Usage response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/usage/streams/{source}
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "metadata": [
    ],
  • "series": [
    ]
}

Get stream usage by SDK version

Get multiple series of the number of streaming connections to LaunchDarkly in each time period, separated by SDK type and version. Information about each series is in the metadata array. The granularity of the data depends on the age of the data requested. If the requested range is within the past 2 hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.

Request
path Parameters
source
required
string <string>

The source of streaming connections to describe. Must be either client or server.

query Parameters
from
string <string>

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

to
string <string>

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

tz
string <string>

The timezone to use for breaks between days when returning daily data.

sdk
string <string>

If included, this filters the returned series to only those that match this SDK name.

version
string <string>

If included, this filters the returned series to only those that match this SDK version.

Responses
200

Usage response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/usage/streams/{source}/bysdkversion
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "metadata": [
    ],
  • "series": [
    ]
}

Get stream usage SDK versions

Get a list of SDK version objects, which contain an SDK name and version. These are all of the SDKs that have connected to LaunchDarkly from your account in the past 60 days.

Request
path Parameters
source
required
string <string>

The source of streaming connections to describe. Must be either client or server.

Responses
200

SDK Versions response

401

Invalid access token

403

Forbidden

429

Rate limited

get/api/v2/usage/streams/{source}/sdkversions
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "sdkVersions": [
    ]
}