All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| getContextsClientsideUsage | GET /api/v2/usage/clientside-contexts | Get contexts clientside usage |
| getContextsServersideUsage | GET /api/v2/usage/serverside-contexts | Get contexts serverside usage |
| getContextsTotalUsage | GET /api/v2/usage/total-contexts | Get contexts total usage |
| getDataExportEventsUsage | GET /api/v2/usage/data-export-events | Get data export events usage |
| getEvaluationsUsage | GET /api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey} | Get evaluations usage |
| getEventsUsage | GET /api/v2/usage/events/{type} | Get events usage |
| getExperimentationEventsUsage | GET /api/v2/usage/experimentation-events | Get experimentation events usage |
| getExperimentationKeysUsage | GET /api/v2/usage/experimentation-keys | Get experimentation keys usage |
| getMAUClientsideUsage | GET /api/v2/usage/clientside-mau | Get MAU clientside usage |
| getMAUTotalUsage | GET /api/v2/usage/total-mau | Get MAU total usage |
| getMauSdksByType | GET /api/v2/usage/mau/sdks | Get MAU SDKs by type |
| getMauUsage | GET /api/v2/usage/mau | Get MAU usage |
| getMauUsageByCategory | GET /api/v2/usage/mau/bycategory | Get MAU usage by category |
| getObservabilityErrorsUsage | GET /api/v2/usage/observability/errors | Get observability errors usage |
| getObservabilityLogsUsage | GET /api/v2/usage/observability/logs | Get observability logs usage |
| getObservabilityMetricsUsage | GET /api/v2/usage/observability/metrics | Get observability metrics usage |
| getObservabilitySessionsUsage | GET /api/v2/usage/observability/sessions | Get observability sessions usage |
| getObservabilityTracesUsage | GET /api/v2/usage/observability/traces | Get observability traces usage |
| getServiceConnectionsUsage | GET /api/v2/usage/service-connections | Get service connections usage |
| getStreamUsage | GET /api/v2/usage/streams/{source} | Get stream usage |
| getStreamUsageBySdkVersion | GET /api/v2/usage/streams/{source}/bysdkversion | Get stream usage by SDK version |
| getStreamUsageSdkversion | GET /api/v2/usage/streams/{source}/sdkversions | Get stream usage SDK versions |
| getVegaAIUsage | GET /api/v2/usage/vega-ai | Get Vega AI usage |
SeriesListRep getContextsClientsideUsage(from, to, projectKey, environmentKey, contextKind, sdkName, anonymous, groupBy, aggregationType, granularity)
Get contexts clientside 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 client-side SDKs.<br/><br/>The supported granularity varies by aggregation type. The maximum time range is 365 days.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String environmentKey = "environmentKey_example"; // String | 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 = "contextKind_example"; // String | A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.
String sdkName = "sdkName_example"; // String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
String anonymous = "anonymous_example"; // String | 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 = "groupBy_example"; // String | 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 = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
String granularity = "granularity_example"; // String | 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.
try {
SeriesListRep result = apiInstance.getContextsClientsideUsage(from, to, projectKey, environmentKey, contextKind, sdkName, anonymous, groupBy, aggregationType, granularity);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getContextsClientsideUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| environmentKey | String | 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. | [optional] |
| contextKind | String | A context kind to filter results by. Can be specified multiple times, one query parameter per context kind. | [optional] |
| sdkName | String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. | [optional] |
| anonymous | String | An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.<br/>Valid values: `true`, `false`. | [optional] |
| groupBy | String | 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`. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
| granularity | String | 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. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
| 503 | Service unavailable | - |
SeriesListRep getContextsServersideUsage(from, to, projectKey, environmentKey, contextKind, sdkName, anonymous, groupBy, aggregationType, granularity)
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.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String environmentKey = "environmentKey_example"; // String | 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 = "contextKind_example"; // String | A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.
String sdkName = "sdkName_example"; // String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
String anonymous = "anonymous_example"; // String | 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 = "groupBy_example"; // String | 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 = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
String granularity = "granularity_example"; // String | 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.
try {
SeriesListRep result = apiInstance.getContextsServersideUsage(from, to, projectKey, environmentKey, contextKind, sdkName, anonymous, groupBy, aggregationType, granularity);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getContextsServersideUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| environmentKey | String | 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. | [optional] |
| contextKind | String | A context kind to filter results by. Can be specified multiple times, one query parameter per context kind. | [optional] |
| sdkName | String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. | [optional] |
| anonymous | String | An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.<br/>Valid values: `true`, `false`. | [optional] |
| groupBy | String | 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`. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
| granularity | String | 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. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
| 503 | Service unavailable | - |
SeriesListRep getContextsTotalUsage(from, to, projectKey, environmentKey, contextKind, sdkName, sdkType, anonymous, groupBy, aggregationType, granularity)
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.<br/><br/>The supported granularity varies by aggregation type. The maximum time range is 365 days.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String environmentKey = "environmentKey_example"; // String | 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 = "contextKind_example"; // String | A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.
String sdkName = "sdkName_example"; // String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
String sdkType = "sdkType_example"; // String | An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.
String anonymous = "anonymous_example"; // String | 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 = "groupBy_example"; // String | 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`.
String aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
String granularity = "granularity_example"; // String | 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.
try {
SeriesListRep result = apiInstance.getContextsTotalUsage(from, to, projectKey, environmentKey, contextKind, sdkName, sdkType, anonymous, groupBy, aggregationType, granularity);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getContextsTotalUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| environmentKey | String | 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. | [optional] |
| contextKind | String | A context kind to filter results by. Can be specified multiple times, one query parameter per context kind. | [optional] |
| sdkName | String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. | [optional] |
| sdkType | String | An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type. | [optional] |
| anonymous | String | An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.<br/>Valid values: `true`, `false`. | [optional] |
| groupBy | String | 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`. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
| granularity | String | 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. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
| 503 | Service unavailable | - |
SeriesListRep getDataExportEventsUsage(from, to, projectKey, environmentKey, eventKind, groupBy, aggregationType, granularity)
Get data export events usage
Get a time series array showing the number of data export events from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String environmentKey = "environmentKey_example"; // String | 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 eventKind = "eventKind_example"; // String | An event kind to filter results by. Can be specified multiple times, one query parameter per event kind.
String groupBy = "groupBy_example"; // String | If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.<br/>Valid values: `environmentId`, `eventKind`.
String aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`.
String granularity = "granularity_example"; // String | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`.
try {
SeriesListRep result = apiInstance.getDataExportEventsUsage(from, to, projectKey, environmentKey, eventKind, groupBy, aggregationType, granularity);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getDataExportEventsUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| environmentKey | String | 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. | [optional] |
| eventKind | String | An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. | [optional] |
| groupBy | String | If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.<br/>Valid values: `environmentId`, `eventKind`. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. | [optional] |
| granularity | String | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the month_to_date aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
| 503 | Service unavailable | - |
SeriesListRep getEvaluationsUsage(projectKey, environmentKey, featureFlagKey, from, to, tz)
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.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String projectKey = "projectKey_example"; // String | The project key
String environmentKey = "environmentKey_example"; // String | The environment key
String featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
String from = "from_example"; // String | The series of data returned starts from this timestamp. Defaults to 30 days ago.
String to = "to_example"; // String | The series of data returned ends at this timestamp. Defaults to the current time.
String tz = "tz_example"; // String | The timezone to use for breaks between days when returning daily data.
try {
SeriesListRep result = apiInstance.getEvaluationsUsage(projectKey, environmentKey, featureFlagKey, from, to, tz);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getEvaluationsUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | String | The project key | |
| environmentKey | String | The environment key | |
| featureFlagKey | String | The feature flag key | |
| from | String | The series of data returned starts from this timestamp. Defaults to 30 days ago. | [optional] |
| to | String | The series of data returned ends at this timestamp. Defaults to the current time. | [optional] |
| tz | String | The timezone to use for breaks between days when returning daily data. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
SeriesListRep getEventsUsage(type, from, to)
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.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String type = "type_example"; // String | The type of event to retrieve. Must be either `received` or `published`.
String from = "from_example"; // String | The series of data returned starts from this timestamp. Defaults to 24 hours ago.
String to = "to_example"; // String | The series of data returned ends at this timestamp. Defaults to the current time.
try {
SeriesListRep result = apiInstance.getEventsUsage(type, from, to);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getEventsUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| type | String | The type of event to retrieve. Must be either `received` or `published`. | |
| from | String | The series of data returned starts from this timestamp. Defaults to 24 hours ago. | [optional] |
| to | String | The series of data returned ends at this timestamp. Defaults to the current time. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
SeriesListRep getExperimentationEventsUsage(from, to, projectKey, environmentKey, eventKey, eventKind, groupBy, aggregationType, granularity)
Get experimentation events usage
Get a time series array showing the number of experimentation events from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String environmentKey = "environmentKey_example"; // String | 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 eventKey = "eventKey_example"; // String | An event key to filter results by. Can be specified multiple times, one query parameter per event key.
String eventKind = "eventKind_example"; // String | An event kind to filter results by. Can be specified multiple times, one query parameter per event kind.
String groupBy = "groupBy_example"; // String | If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.<br/>Valid values: `environmentId`, `eventKey`, `eventKind`.
String aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`.
String granularity = "granularity_example"; // String | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`.
try {
SeriesListRep result = apiInstance.getExperimentationEventsUsage(from, to, projectKey, environmentKey, eventKey, eventKind, groupBy, aggregationType, granularity);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getExperimentationEventsUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| environmentKey | String | 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. | [optional] |
| eventKey | String | An event key to filter results by. Can be specified multiple times, one query parameter per event key. | [optional] |
| eventKind | String | An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. | [optional] |
| groupBy | String | If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.<br/>Valid values: `environmentId`, `eventKey`, `eventKind`. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. | [optional] |
| granularity | String | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the month_to_date aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
| 503 | Service unavailable | - |
SeriesListRep getExperimentationKeysUsage(from, to, projectKey, environmentKey, experimentId, groupBy, aggregationType, granularity)
Get experimentation keys usage
Get a time series array showing the number of experimentation keys from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String environmentKey = "environmentKey_example"; // String | 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 experimentId = "experimentId_example"; // String | An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID.
String groupBy = "groupBy_example"; // String | If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.<br/>Valid values: `projectId`, `environmentId`, `experimentId`.
String aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`.
String granularity = "granularity_example"; // String | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`.
try {
SeriesListRep result = apiInstance.getExperimentationKeysUsage(from, to, projectKey, environmentKey, experimentId, groupBy, aggregationType, granularity);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getExperimentationKeysUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| environmentKey | String | 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. | [optional] |
| experimentId | String | An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID. | [optional] |
| groupBy | String | If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.<br/>Valid values: `projectId`, `environmentId`, `experimentId`. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. | [optional] |
| granularity | String | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the month_to_date aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
| 503 | Service unavailable | - |
SeriesListRep getMAUClientsideUsage(from, to, projectKey, environmentKey, sdkName, anonymous, groupBy, aggregationType, granularity)
Get MAU clientside usage
Get a time series of the number of context key usages observed by LaunchDarkly in your account, for the primary context kind only. The counts reflect data reported from client-side SDKs.<br/><br/>For past months, the primary context kind is fixed and reflects the last known primary kind for that month. For the current month, it may vary as new primary context kinds are observed.<br/><br/>The supported granularity varies by aggregation type. The maximum time range is 365 days.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String environmentKey = "environmentKey_example"; // String | 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 sdkName = "sdkName_example"; // String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
String anonymous = "anonymous_example"; // String | 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 = "groupBy_example"; // String | If specified, returns data for each distinct value of the given field. 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 = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
String granularity = "granularity_example"; // String | 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.
try {
SeriesListRep result = apiInstance.getMAUClientsideUsage(from, to, projectKey, environmentKey, sdkName, anonymous, groupBy, aggregationType, granularity);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getMAUClientsideUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| environmentKey | String | 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. | [optional] |
| sdkName | String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. | [optional] |
| anonymous | String | An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.<br/>Valid values: `true`, `false`. | [optional] |
| groupBy | String | If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.<br/>Valid values: `projectId`, `environmentId`, `sdkName`, `sdkAppId`, `anonymousV2`. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
| granularity | String | 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. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
| 503 | Service unavailable | - |
SeriesListRep getMAUTotalUsage(from, to, projectKey, environmentKey, sdkName, sdkType, anonymous, groupBy, aggregationType, granularity)
Get MAU total usage
Get a time series of the number of context key usages observed by LaunchDarkly in your account, for the primary context kind only.<br/><br/>For past months, this reflects the context kind that was most recently marked as primary for that month. For the current month, the context kind may vary as new primary kinds are observed.<br/><br/>The supported granularity varies by aggregation type. The maximum time range is 365 days.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String environmentKey = "environmentKey_example"; // String | 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 sdkName = "sdkName_example"; // String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
String sdkType = "sdkType_example"; // String | An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.
String anonymous = "anonymous_example"; // String | 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 = "groupBy_example"; // String | If specified, returns data for each distinct value of the given field. 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`.
String aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
String granularity = "granularity_example"; // String | 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.
try {
SeriesListRep result = apiInstance.getMAUTotalUsage(from, to, projectKey, environmentKey, sdkName, sdkType, anonymous, groupBy, aggregationType, granularity);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getMAUTotalUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| environmentKey | String | 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. | [optional] |
| sdkName | String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. | [optional] |
| sdkType | String | An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type. | [optional] |
| anonymous | String | An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.<br/>Valid values: `true`, `false`. | [optional] |
| groupBy | String | If specified, returns data for each distinct value of the given field. 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`. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
| granularity | String | 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. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
| 503 | Service unavailable | - |
SdkListRep getMauSdksByType(from, to, sdktype)
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.<br/><br/>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.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The data returned starts from this timestamp. Defaults to seven days ago. The timestamp is in Unix milliseconds, for example, 1656694800000.
String to = "to_example"; // String | The data returned ends at this timestamp. Defaults to the current time. The timestamp is in Unix milliseconds, for example, 1657904400000.
String sdktype = "sdktype_example"; // String | The type of SDK with monthly active users (MAU) to list. Must be either `client` or `server`.
try {
SdkListRep result = apiInstance.getMauSdksByType(from, to, sdktype);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getMauSdksByType");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The data returned starts from this timestamp. Defaults to seven days ago. The timestamp is in Unix milliseconds, for example, 1656694800000. | [optional] |
| to | String | The data returned ends at this timestamp. Defaults to the current time. The timestamp is in Unix milliseconds, for example, 1657904400000. | [optional] |
| sdktype | String | The type of SDK with monthly active users (MAU) to list. Must be either `client` or `server`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | MAU SDKs response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
SeriesListRep getMauUsage(from, to, project, environment, sdktype, sdk, anonymous, groupby, aggregationType, contextKind)
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.<br/><br/>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.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp. Defaults to 30 days ago.
String to = "to_example"; // String | The series of data returned ends at this timestamp. Defaults to the current time.
String project = "project_example"; // 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.
String environment = "environment_example"; // 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.
String sdktype = "sdktype_example"; // String | An SDK type to filter results to. Can be specified multiple times, one query parameter per SDK type. Valid values: client, server
String sdk = "sdk_example"; // String | An SDK name to filter results to. Can be specified multiple times, one query parameter per SDK.
String anonymous = "anonymous_example"; // String | If specified, filters results to either anonymous or nonanonymous users.
String groupby = "groupby_example"; // 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, contextKind, sdkAppId
String aggregationType = "aggregationType_example"; // String | If specified, queries for rolling 30-day, month-to-date, or daily incremental counts. Default is rolling 30-day. Valid values: rolling_30d, month_to_date, daily_incremental
String contextKind = "contextKind_example"; // String | Filters results to the specified context kinds. Can be specified multiple times, one query parameter per context kind. If not set, queries for the user context kind.
try {
SeriesListRep result = apiInstance.getMauUsage(from, to, project, environment, sdktype, sdk, anonymous, groupby, aggregationType, contextKind);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getMauUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp. Defaults to 30 days ago. | [optional] |
| to | String | The series of data returned ends at this timestamp. Defaults to the current time. | [optional] |
| project | 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. | [optional] |
| environment | 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. | [optional] |
| sdktype | String | An SDK type to filter results to. Can be specified multiple times, one query parameter per SDK type. Valid values: client, server | [optional] |
| sdk | String | An SDK name to filter results to. Can be specified multiple times, one query parameter per SDK. | [optional] |
| anonymous | String | If specified, filters results to either anonymous or nonanonymous users. | [optional] |
| groupby | 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, contextKind, sdkAppId | [optional] |
| aggregationType | String | If specified, queries for rolling 30-day, month-to-date, or daily incremental counts. Default is rolling 30-day. Valid values: rolling_30d, month_to_date, daily_incremental | [optional] |
| contextKind | String | Filters results to the specified context kinds. Can be specified multiple times, one query parameter per context kind. If not set, queries for the user context kind. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
SeriesListRep getMauUsageByCategory(from, to)
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`.<br/><br/>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.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp. Defaults to 30 days ago.
String to = "to_example"; // String | The series of data returned ends at this timestamp. Defaults to the current time.
try {
SeriesListRep result = apiInstance.getMauUsageByCategory(from, to);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getMauUsageByCategory");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp. Defaults to 30 days ago. | [optional] |
| to | String | The series of data returned ends at this timestamp. Defaults to the current time. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
SeriesListRep getObservabilityErrorsUsage(from, to, projectKey, granularity, aggregationType)
Get observability errors usage
Get time-series arrays of the number of observability errors. Supports `daily` and `monthly` granularity.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String granularity = "granularity_example"; // String | 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 aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
try {
SeriesListRep result = apiInstance.getObservabilityErrorsUsage(from, to, projectKey, granularity, aggregationType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getObservabilityErrorsUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| granularity | String | 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. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
SeriesListRep getObservabilityLogsUsage(from, to, projectKey, granularity, aggregationType)
Get observability logs usage
Get time-series arrays of the number of observability logs. Supports `daily` and `monthly` granularity.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String granularity = "granularity_example"; // String | 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 aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
try {
SeriesListRep result = apiInstance.getObservabilityLogsUsage(from, to, projectKey, granularity, aggregationType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getObservabilityLogsUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| granularity | String | 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. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
SeriesListRep getObservabilityMetricsUsage(from, to, projectKey, granularity, aggregationType)
Get observability metrics usage
Get time-series arrays of the number of observability metrics. Supports `daily` and `monthly` granularity.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String granularity = "granularity_example"; // String | 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 aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
try {
SeriesListRep result = apiInstance.getObservabilityMetricsUsage(from, to, projectKey, granularity, aggregationType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getObservabilityMetricsUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| granularity | String | 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. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
SeriesListRep getObservabilitySessionsUsage(from, to, projectKey, granularity, aggregationType)
Get observability sessions usage
Get time-series arrays of the number of observability sessions. Supports `daily` and `monthly` granularity.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String granularity = "granularity_example"; // String | 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 aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
try {
SeriesListRep result = apiInstance.getObservabilitySessionsUsage(from, to, projectKey, granularity, aggregationType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getObservabilitySessionsUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| granularity | String | 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. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
SeriesListRep getObservabilityTracesUsage(from, to, projectKey, granularity, aggregationType)
Get observability traces usage
Get time-series arrays of the number of observability traces. Supports `daily` and `monthly` granularity.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String granularity = "granularity_example"; // String | 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 aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
try {
SeriesListRep result = apiInstance.getObservabilityTracesUsage(from, to, projectKey, granularity, aggregationType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getObservabilityTracesUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| granularity | String | 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. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
SeriesListRepFloat getServiceConnectionsUsage(from, to, projectKey, environmentKey, connectionType, relayVersion, sdkName, sdkVersion, sdkType, groupBy, aggregationType, granularity)
Get service connections usage
Get a time series array showing the number of service connection minutes from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String environmentKey = "environmentKey_example"; // String | 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 connectionType = "connectionType_example"; // String | A connection type to filter results by. Can be specified multiple times, one query parameter per connection type.
String relayVersion = "relayVersion_example"; // String | A relay version to filter results by. Can be specified multiple times, one query parameter per relay version.
String sdkName = "sdkName_example"; // String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
String sdkVersion = "sdkVersion_example"; // String | An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version.
String sdkType = "sdkType_example"; // String | An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.
String groupBy = "groupBy_example"; // String | If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkType`.
String aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`.
String granularity = "granularity_example"; // String | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`.
try {
SeriesListRepFloat result = apiInstance.getServiceConnectionsUsage(from, to, projectKey, environmentKey, connectionType, relayVersion, sdkName, sdkVersion, sdkType, groupBy, aggregationType, granularity);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getServiceConnectionsUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| environmentKey | String | 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. | [optional] |
| connectionType | String | A connection type to filter results by. Can be specified multiple times, one query parameter per connection type. | [optional] |
| relayVersion | String | A relay version to filter results by. Can be specified multiple times, one query parameter per relay version. | [optional] |
| sdkName | String | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. | [optional] |
| sdkVersion | String | An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version. | [optional] |
| sdkType | String | An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type. | [optional] |
| groupBy | String | If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkType`. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. | [optional] |
| granularity | String | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the month_to_date aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
| 503 | Service unavailable | - |
SeriesListRep getStreamUsage(source, from, to, tz)
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.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String source = "source_example"; // String | The source of streaming connections to describe. Must be either `client` or `server`.
String from = "from_example"; // String | The series of data returned starts from this timestamp. Defaults to 30 days ago.
String to = "to_example"; // String | The series of data returned ends at this timestamp. Defaults to the current time.
String tz = "tz_example"; // String | The timezone to use for breaks between days when returning daily data.
try {
SeriesListRep result = apiInstance.getStreamUsage(source, from, to, tz);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getStreamUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| source | String | The source of streaming connections to describe. Must be either `client` or `server`. | |
| from | String | The series of data returned starts from this timestamp. Defaults to 30 days ago. | [optional] |
| to | String | The series of data returned ends at this timestamp. Defaults to the current time. | [optional] |
| tz | String | The timezone to use for breaks between days when returning daily data. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
SeriesListRep getStreamUsageBySdkVersion(source, from, to, tz, sdk, version)
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.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String source = "source_example"; // String | The source of streaming connections to describe. Must be either `client` or `server`.
String from = "from_example"; // String | The series of data returned starts from this timestamp. Defaults to 24 hours ago.
String to = "to_example"; // String | The series of data returned ends at this timestamp. Defaults to the current time.
String tz = "tz_example"; // String | The timezone to use for breaks between days when returning daily data.
String sdk = "sdk_example"; // String | If included, this filters the returned series to only those that match this SDK name.
String version = "version_example"; // String | If included, this filters the returned series to only those that match this SDK version.
try {
SeriesListRep result = apiInstance.getStreamUsageBySdkVersion(source, from, to, tz, sdk, version);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getStreamUsageBySdkVersion");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| source | String | The source of streaming connections to describe. Must be either `client` or `server`. | |
| from | String | The series of data returned starts from this timestamp. Defaults to 24 hours ago. | [optional] |
| to | String | The series of data returned ends at this timestamp. Defaults to the current time. | [optional] |
| tz | String | The timezone to use for breaks between days when returning daily data. | [optional] |
| sdk | String | If included, this filters the returned series to only those that match this SDK name. | [optional] |
| version | String | If included, this filters the returned series to only those that match this SDK version. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
SdkVersionListRep getStreamUsageSdkversion(source)
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.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String source = "source_example"; // String | The source of streaming connections to describe. Must be either `client` or `server`.
try {
SdkVersionListRep result = apiInstance.getStreamUsageSdkversion(source);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getStreamUsageSdkversion");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| source | String | The source of streaming connections to describe. Must be either `client` or `server`. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | SDK Versions response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
SeriesListRep getVegaAIUsage(from, to, projectKey, granularity, aggregationType)
Get Vega AI usage
Get time-series arrays of the number of Vega AI usage. Supports `daily` and `monthly` granularity.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.AccountUsageBetaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
AccountUsageBetaApi apiInstance = new AccountUsageBetaApi(defaultClient);
String from = "from_example"; // String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
String to = "to_example"; // String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
String projectKey = "projectKey_example"; // String | A project key to filter results by. Can be specified multiple times, one query parameter per project key.
String granularity = "granularity_example"; // String | 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 aggregationType = "aggregationType_example"; // String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`.
try {
SeriesListRep result = apiInstance.getVegaAIUsage(from, to, projectKey, granularity, aggregationType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountUsageBetaApi#getVegaAIUsage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| from | String | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. | [optional] |
| to | String | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. | [optional] |
| projectKey | String | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | [optional] |
| granularity | String | 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. | [optional] |
| aggregationType | String | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |