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.

The Account Usage API lets you query for metrics about how your account is using LaunchDarkly. 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 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
Security:
ApiKey (readwrite)
path Parameters
projKey
required
string <string>

The project key.

envKey
required
string <string>

The environment key.

flagKey
required
string <string>

The feature flag's 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/{projKey}/{envKey}/{flagKey}
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/usage/evaluations/:projKey/:envKey/:flagKey \
  -H 'Authorization: YOUR_API_KEY_HERE'
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
Security:
ApiKey (readwrite)
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
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/usage/events/:type \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "_links": {
    },
  • "metadata": [
    ],
  • "series": [
    ]
}

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.

Request
Security:
ApiKey (readwrite)
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
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/usage/mau \
  -H 'Authorization: YOUR_API_KEY_HERE'
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.

Request
Security:
ApiKey (readwrite)
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
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/usage/mau/bycategory \
  -H 'Authorization: YOUR_API_KEY_HERE'
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.

Request
Security:
ApiKey (readwrite)
query Parameters
from
string <string>

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

to
string <string>

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

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
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/usage/mau/sdks \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "_links": {
    },
  • "sdks": [
    ]
}

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
Security:
ApiKey (readwrite)
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
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/usage/streams/:source \
  -H 'Authorization: YOUR_API_KEY_HERE'
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
Security:
ApiKey (readwrite)
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
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/usage/streams/:source/bysdkversion \
  -H 'Authorization: YOUR_API_KEY_HERE'
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
Security:
ApiKey (readwrite)
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
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/usage/streams/:source/sdkversions \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "_links": {
    },
  • "sdkVersions": [
    ]
}