Class: LaunchDarklyApi::AccountUsageBetaApi

Inherits:
Object
  • Object
show all
Defined in:
lib/launchdarkly_api/api/account_usage_beta_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AccountUsageBetaApi

Returns a new instance of AccountUsageBetaApi.



19
20
21
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_contexts_clientside_usage(opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :context_kind (String)

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

  • :sdk_name (String)

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

  • :anonymous (String)

    An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.

  • :group_by (String)

    If specified, returns data for each distinct value of the given field. &#x60;contextKind&#x60; is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

  • :granularity (String)

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

Returns:



36
37
38
39
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 36

def get_contexts_clientside_usage(opts = {})
  data, _status_code, _headers = get_contexts_clientside_usage_with_http_info(opts)
  data
end

#get_contexts_clientside_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.&lt;br/&gt;&lt;br/&gt;The supported granularity varies by aggregation type. The maximum time range is 365 days.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :context_kind (String)

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

  • :sdk_name (String)

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

  • :anonymous (String)

    An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.

  • :group_by (String)

    If specified, returns data for each distinct value of the given field. &#x60;contextKind&#x60; is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

  • :granularity (String)

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

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 55

def get_contexts_clientside_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_contexts_clientside_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/clientside-contexts'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
  query_params[:'contextKind'] = opts[:'context_kind'] if !opts[:'context_kind'].nil?
  query_params[:'sdkName'] = opts[:'sdk_name'] if !opts[:'sdk_name'].nil?
  query_params[:'anonymous'] = opts[:'anonymous'] if !opts[:'anonymous'].nil?
  query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_contexts_clientside_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_contexts_clientside_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_contexts_serverside_usage(opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :context_kind (String)

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

  • :sdk_name (String)

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

  • :anonymous (String)

    An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.

  • :group_by (String)

    If specified, returns data for each distinct value of the given field. &#x60;contextKind&#x60; is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

  • :granularity (String)

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

Returns:



123
124
125
126
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 123

def get_contexts_serverside_usage(opts = {})
  data, _status_code, _headers = get_contexts_serverside_usage_with_http_info(opts)
  data
end

#get_contexts_serverside_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.&lt;br/&gt;&lt;br/&gt;The supported granularity varies by aggregation type. The maximum time range is 365 days.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :context_kind (String)

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

  • :sdk_name (String)

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

  • :anonymous (String)

    An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.

  • :group_by (String)

    If specified, returns data for each distinct value of the given field. &#x60;contextKind&#x60; is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

  • :granularity (String)

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

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 142

def get_contexts_serverside_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_contexts_serverside_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/serverside-contexts'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
  query_params[:'contextKind'] = opts[:'context_kind'] if !opts[:'context_kind'].nil?
  query_params[:'sdkName'] = opts[:'sdk_name'] if !opts[:'sdk_name'].nil?
  query_params[:'anonymous'] = opts[:'anonymous'] if !opts[:'anonymous'].nil?
  query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_contexts_serverside_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_contexts_serverside_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_contexts_total_usage(opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :context_kind (String)

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

  • :sdk_name (String)

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

  • :sdk_type (String)

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

  • :anonymous (String)

    An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.

  • :group_by (String)

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

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

  • :granularity (String)

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

Returns:



211
212
213
214
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 211

def get_contexts_total_usage(opts = {})
  data, _status_code, _headers = get_contexts_total_usage_with_http_info(opts)
  data
end

#get_contexts_total_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.&lt;br/&gt;&lt;br/&gt;The supported granularity varies by aggregation type. The maximum time range is 365 days.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :context_kind (String)

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

  • :sdk_name (String)

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

  • :sdk_type (String)

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

  • :anonymous (String)

    An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.

  • :group_by (String)

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

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

  • :granularity (String)

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

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 231

def get_contexts_total_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_contexts_total_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/total-contexts'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
  query_params[:'contextKind'] = opts[:'context_kind'] if !opts[:'context_kind'].nil?
  query_params[:'sdkName'] = opts[:'sdk_name'] if !opts[:'sdk_name'].nil?
  query_params[:'sdkType'] = opts[:'sdk_type'] if !opts[:'sdk_type'].nil?
  query_params[:'anonymous'] = opts[:'anonymous'] if !opts[:'anonymous'].nil?
  query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_contexts_total_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_contexts_total_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_data_export_events_usage(opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :event_kind (String)

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

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;environmentId&#x60;, &#x60;eventKind&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;.

  • :granularity (String)

    Specifies the data granularity. Defaults to &#x60;daily&#x60;. &#x60;monthly&#x60; granularity is only supported with the month_to_date aggregation type.&lt;br/&gt;Valid values: &#x60;daily&#x60;, &#x60;hourly&#x60;, &#x60;monthly&#x60;.

Returns:



298
299
300
301
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 298

def get_data_export_events_usage(opts = {})
  data, _status_code, _headers = get_data_export_events_usage_with_http_info(opts)
  data
end

#get_data_export_events_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :event_kind (String)

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

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;environmentId&#x60;, &#x60;eventKind&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;.

  • :granularity (String)

    Specifies the data granularity. Defaults to &#x60;daily&#x60;. &#x60;monthly&#x60; granularity is only supported with the month_to_date aggregation type.&lt;br/&gt;Valid values: &#x60;daily&#x60;, &#x60;hourly&#x60;, &#x60;monthly&#x60;.

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 315

def get_data_export_events_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_data_export_events_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/data-export-events'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
  query_params[:'eventKind'] = opts[:'event_kind'] if !opts[:'event_kind'].nil?
  query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_data_export_events_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_data_export_events_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_evaluations_usage(project_key, environment_key, feature_flag_key, opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • project_key (String)

    The project key

  • environment_key (String)

    The environment key

  • feature_flag_key (String)

    The feature flag key

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :tz (String)

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

Returns:



377
378
379
380
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 377

def get_evaluations_usage(project_key, environment_key, feature_flag_key, opts = {})
  data, _status_code, _headers = get_evaluations_usage_with_http_info(project_key, environment_key, feature_flag_key, opts)
  data
end

#get_evaluations_usage_with_http_info(project_key, environment_key, feature_flag_key, opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.

Parameters:

  • project_key (String)

    The project key

  • environment_key (String)

    The environment key

  • feature_flag_key (String)

    The feature flag key

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :tz (String)

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

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 392

def get_evaluations_usage_with_http_info(project_key, environment_key, feature_flag_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_evaluations_usage ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling AccountUsageBetaApi.get_evaluations_usage"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling AccountUsageBetaApi.get_evaluations_usage"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling AccountUsageBetaApi.get_evaluations_usage"
  end
  # resource path
  local_var_path = '/api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'tz'] = opts[:'tz'] if !opts[:'tz'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_evaluations_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_evaluations_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_events_usage(type, opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • type (String)

    The type of event to retrieve. Must be either &#x60;received&#x60; or &#x60;published&#x60;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

Returns:



458
459
460
461
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 458

def get_events_usage(type, opts = {})
  data, _status_code, _headers = get_events_usage_with_http_info(type, opts)
  data
end

#get_events_usage_with_http_info(type, opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.

Parameters:

  • type (String)

    The type of event to retrieve. Must be either &#x60;received&#x60; or &#x60;published&#x60;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 470

def get_events_usage_with_http_info(type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_events_usage ...'
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling AccountUsageBetaApi.get_events_usage"
  end
  # resource path
  local_var_path = '/api/v2/usage/events/{type}'.sub('{' + 'type' + '}', CGI.escape(type.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_events_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_events_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_experimentation_events_usage(opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :event_key (String)

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

  • :event_kind (String)

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

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;environmentId&#x60;, &#x60;eventKey&#x60;, &#x60;eventKind&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;.

  • :granularity (String)

    Specifies the data granularity. Defaults to &#x60;daily&#x60;. &#x60;monthly&#x60; granularity is only supported with the month_to_date aggregation type.&lt;br/&gt;Valid values: &#x60;daily&#x60;, &#x60;hourly&#x60;, &#x60;monthly&#x60;.

Returns:



533
534
535
536
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 533

def get_experimentation_events_usage(opts = {})
  data, _status_code, _headers = get_experimentation_events_usage_with_http_info(opts)
  data
end

#get_experimentation_events_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :event_key (String)

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

  • :event_kind (String)

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

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;environmentId&#x60;, &#x60;eventKey&#x60;, &#x60;eventKind&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;.

  • :granularity (String)

    Specifies the data granularity. Defaults to &#x60;daily&#x60;. &#x60;monthly&#x60; granularity is only supported with the month_to_date aggregation type.&lt;br/&gt;Valid values: &#x60;daily&#x60;, &#x60;hourly&#x60;, &#x60;monthly&#x60;.

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 551

def get_experimentation_events_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_experimentation_events_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/experimentation-events'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
  query_params[:'eventKey'] = opts[:'event_key'] if !opts[:'event_key'].nil?
  query_params[:'eventKind'] = opts[:'event_kind'] if !opts[:'event_kind'].nil?
  query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_experimentation_events_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_experimentation_events_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_experimentation_keys_usage(opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :experiment_id (String)

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

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;experimentId&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;.

  • :granularity (String)

    Specifies the data granularity. Defaults to &#x60;daily&#x60;. &#x60;monthly&#x60; granularity is only supported with the month_to_date aggregation type.&lt;br/&gt;Valid values: &#x60;daily&#x60;, &#x60;hourly&#x60;, &#x60;monthly&#x60;.

Returns:



616
617
618
619
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 616

def get_experimentation_keys_usage(opts = {})
  data, _status_code, _headers = get_experimentation_keys_usage_with_http_info(opts)
  data
end

#get_experimentation_keys_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :experiment_id (String)

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

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;experimentId&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;.

  • :granularity (String)

    Specifies the data granularity. Defaults to &#x60;daily&#x60;. &#x60;monthly&#x60; granularity is only supported with the month_to_date aggregation type.&lt;br/&gt;Valid values: &#x60;daily&#x60;, &#x60;hourly&#x60;, &#x60;monthly&#x60;.

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 633

def get_experimentation_keys_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_experimentation_keys_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/experimentation-keys'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
  query_params[:'experimentId'] = opts[:'experiment_id'] if !opts[:'experiment_id'].nil?
  query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_experimentation_keys_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_experimentation_keys_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_mau_clientside_usage(opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :sdk_name (String)

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

  • :anonymous (String)

    An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

  • :granularity (String)

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

Returns:



698
699
700
701
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 698

def get_mau_clientside_usage(opts = {})
  data, _status_code, _headers = get_mau_clientside_usage_with_http_info(opts)
  data
end

#get_mau_clientside_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;The supported granularity varies by aggregation type. The maximum time range is 365 days.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :sdk_name (String)

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

  • :anonymous (String)

    An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

  • :granularity (String)

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

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 716

def get_mau_clientside_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_mau_clientside_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/clientside-mau'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
  query_params[:'sdkName'] = opts[:'sdk_name'] if !opts[:'sdk_name'].nil?
  query_params[:'anonymous'] = opts[:'anonymous'] if !opts[:'anonymous'].nil?
  query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_mau_clientside_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_mau_clientside_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_mau_sdks_by_type(opts = {}) ⇒ SdkListRep

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](launchdarkly.com/docs/home/account/metrics).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :sdktype (String)

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

Returns:



776
777
778
779
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 776

def get_mau_sdks_by_type(opts = {})
  data, _status_code, _headers = get_mau_sdks_by_type_with_http_info(opts)
  data
end

#get_mau_sdks_by_type_with_http_info(opts = {}) ⇒ Array<(SdkListRep, Integer, Hash)>

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.&lt;br/&gt;&lt;br/&gt;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](launchdarkly.com/docs/home/account/metrics).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :sdktype (String)

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

Returns:

  • (Array<(SdkListRep, Integer, Hash)>)

    SdkListRep data, response status code and response headers



788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 788

def get_mau_sdks_by_type_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_mau_sdks_by_type ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/mau/sdks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'sdktype'] = opts[:'sdktype'] if !opts[:'sdktype'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SdkListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_mau_sdks_by_type",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_mau_sdks_by_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_mau_total_usage(opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :sdk_name (String)

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

  • :sdk_type (String)

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

  • :anonymous (String)

    An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkType&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

  • :granularity (String)

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

Returns:



849
850
851
852
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 849

def get_mau_total_usage(opts = {})
  data, _status_code, _headers = get_mau_total_usage_with_http_info(opts)
  data
end

#get_mau_total_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;The supported granularity varies by aggregation type. The maximum time range is 365 days.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :sdk_name (String)

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

  • :sdk_type (String)

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

  • :anonymous (String)

    An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkType&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

  • :granularity (String)

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

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 868

def get_mau_total_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_mau_total_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/total-mau'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
  query_params[:'sdkName'] = opts[:'sdk_name'] if !opts[:'sdk_name'].nil?
  query_params[:'sdkType'] = opts[:'sdk_type'] if !opts[:'sdk_type'].nil?
  query_params[:'anonymous'] = opts[:'anonymous'] if !opts[:'anonymous'].nil?
  query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_mau_total_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_mau_total_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_mau_usage(opts = {}) ⇒ SeriesListRep

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](launchdarkly.com/docs/home/account/metrics).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :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.

  • :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.

  • :sdktype (String)

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

  • :sdk (String)

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

  • :anonymous (String)

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

  • :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

  • :aggregation_type (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

  • :context_kind (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.

Returns:



936
937
938
939
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 936

def get_mau_usage(opts = {})
  data, _status_code, _headers = get_mau_usage_with_http_info(opts)
  data
end

#get_mau_usage_by_category(opts = {}) ⇒ SeriesListRep

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](launchdarkly.com/docs/home/account/metrics).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

Returns:



1015
1016
1017
1018
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1015

def get_mau_usage_by_category(opts = {})
  data, _status_code, _headers = get_mau_usage_by_category_with_http_info(opts)
  data
end

#get_mau_usage_by_category_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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 &#x60;browser&#x60;, &#x60;mobile&#x60;, or &#x60;backend&#x60;.&lt;br/&gt;&lt;br/&gt;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](launchdarkly.com/docs/home/account/metrics).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1026

def get_mau_usage_by_category_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_mau_usage_by_category ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/mau/bycategory'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_mau_usage_by_category",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_mau_usage_by_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_mau_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.&lt;br/&gt;&lt;br/&gt;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](launchdarkly.com/docs/home/account/metrics).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :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.

  • :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.

  • :sdktype (String)

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

  • :sdk (String)

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

  • :anonymous (String)

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

  • :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

  • :aggregation_type (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

  • :context_kind (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.

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 955

def get_mau_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_mau_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/mau'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'project'] = opts[:'project'] if !opts[:'project'].nil?
  query_params[:'environment'] = opts[:'environment'] if !opts[:'environment'].nil?
  query_params[:'sdktype'] = opts[:'sdktype'] if !opts[:'sdktype'].nil?
  query_params[:'sdk'] = opts[:'sdk'] if !opts[:'sdk'].nil?
  query_params[:'anonymous'] = opts[:'anonymous'] if !opts[:'anonymous'].nil?
  query_params[:'groupby'] = opts[:'groupby'] if !opts[:'groupby'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
  query_params[:'contextKind'] = opts[:'context_kind'] if !opts[:'context_kind'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_mau_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_mau_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_observability_errors_usage(opts = {}) ⇒ SeriesListRep

Get observability errors usage Get time-series arrays of the number of observability errors. Supports ‘daily` and `monthly` granularity.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :granularity (String)

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

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

Returns:



1081
1082
1083
1084
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1081

def get_observability_errors_usage(opts = {})
  data, _status_code, _headers = get_observability_errors_usage_with_http_info(opts)
  data
end

#get_observability_errors_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

Get observability errors usage Get time-series arrays of the number of observability errors. Supports &#x60;daily&#x60; and &#x60;monthly&#x60; granularity.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :granularity (String)

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

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1095

def get_observability_errors_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_observability_errors_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/observability/errors'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_observability_errors_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_observability_errors_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_observability_logs_usage(opts = {}) ⇒ SeriesListRep

Get observability logs usage Get time-series arrays of the number of observability logs. Supports ‘daily` and `monthly` granularity.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :granularity (String)

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

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

Returns:



1153
1154
1155
1156
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1153

def get_observability_logs_usage(opts = {})
  data, _status_code, _headers = get_observability_logs_usage_with_http_info(opts)
  data
end

#get_observability_logs_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

Get observability logs usage Get time-series arrays of the number of observability logs. Supports &#x60;daily&#x60; and &#x60;monthly&#x60; granularity.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :granularity (String)

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

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1167

def get_observability_logs_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_observability_logs_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/observability/logs'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_observability_logs_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_observability_logs_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_observability_sessions_usage(opts = {}) ⇒ SeriesListRep

Get observability sessions usage Get time-series arrays of the number of observability sessions. Supports ‘daily` and `monthly` granularity.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :granularity (String)

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

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

Returns:



1225
1226
1227
1228
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1225

def get_observability_sessions_usage(opts = {})
  data, _status_code, _headers = get_observability_sessions_usage_with_http_info(opts)
  data
end

#get_observability_sessions_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

Get observability sessions usage Get time-series arrays of the number of observability sessions. Supports &#x60;daily&#x60; and &#x60;monthly&#x60; granularity.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :granularity (String)

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

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1239

def get_observability_sessions_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_observability_sessions_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/observability/sessions'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_observability_sessions_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_observability_sessions_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_observability_traces_usage(opts = {}) ⇒ SeriesListRep

Get observability traces usage Get time-series arrays of the number of observability traces. Supports ‘daily` and `monthly` granularity.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :granularity (String)

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

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

Returns:



1297
1298
1299
1300
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1297

def get_observability_traces_usage(opts = {})
  data, _status_code, _headers = get_observability_traces_usage_with_http_info(opts)
  data
end

#get_observability_traces_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

Get observability traces usage Get time-series arrays of the number of observability traces. Supports &#x60;daily&#x60; and &#x60;monthly&#x60; granularity.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :granularity (String)

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

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1311

def get_observability_traces_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_observability_traces_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/observability/traces'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_observability_traces_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_observability_traces_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_service_connections_usage(opts = {}) ⇒ SeriesListRepFloat

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :connection_type (String)

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

  • :relay_version (String)

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

  • :sdk_name (String)

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

  • :sdk_version (String)

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

  • :sdk_type (String)

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

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;connectionType&#x60;, &#x60;relayVersion&#x60;, &#x60;sdkName&#x60;, &#x60;sdkVersion&#x60;, &#x60;sdkType&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;.

  • :granularity (String)

    Specifies the data granularity. Defaults to &#x60;daily&#x60;. &#x60;monthly&#x60; granularity is only supported with the month_to_date aggregation type.&lt;br/&gt;Valid values: &#x60;daily&#x60;, &#x60;hourly&#x60;, &#x60;monthly&#x60;.

Returns:



1376
1377
1378
1379
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1376

def get_service_connections_usage(opts = {})
  data, _status_code, _headers = get_service_connections_usage_with_http_info(opts)
  data
end

#get_service_connections_usage_with_http_info(opts = {}) ⇒ Array<(SeriesListRepFloat, Integer, Hash)>

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :project_key (String)

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

  • :environment_key (String)

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

  • :connection_type (String)

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

  • :relay_version (String)

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

  • :sdk_name (String)

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

  • :sdk_version (String)

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

  • :sdk_type (String)

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

  • :group_by (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.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;connectionType&#x60;, &#x60;relayVersion&#x60;, &#x60;sdkName&#x60;, &#x60;sdkVersion&#x60;, &#x60;sdkType&#x60;.

  • :aggregation_type (String)

    Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;.

  • :granularity (String)

    Specifies the data granularity. Defaults to &#x60;daily&#x60;. &#x60;monthly&#x60; granularity is only supported with the month_to_date aggregation type.&lt;br/&gt;Valid values: &#x60;daily&#x60;, &#x60;hourly&#x60;, &#x60;monthly&#x60;.

Returns:

  • (Array<(SeriesListRepFloat, Integer, Hash)>)

    SeriesListRepFloat data, response status code and response headers



1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1397

def get_service_connections_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_service_connections_usage ...'
  end
  # resource path
  local_var_path = '/api/v2/usage/service-connections'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
  query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
  query_params[:'connectionType'] = opts[:'connection_type'] if !opts[:'connection_type'].nil?
  query_params[:'relayVersion'] = opts[:'relay_version'] if !opts[:'relay_version'].nil?
  query_params[:'sdkName'] = opts[:'sdk_name'] if !opts[:'sdk_name'].nil?
  query_params[:'sdkVersion'] = opts[:'sdk_version'] if !opts[:'sdk_version'].nil?
  query_params[:'sdkType'] = opts[:'sdk_type'] if !opts[:'sdk_type'].nil?
  query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
  query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRepFloat'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_service_connections_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_service_connections_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stream_usage(source, opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • source (String)

    The source of streaming connections to describe. Must be either &#x60;client&#x60; or &#x60;server&#x60;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :tz (String)

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

Returns:



1461
1462
1463
1464
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1461

def get_stream_usage(source, opts = {})
  data, _status_code, _headers = get_stream_usage_with_http_info(source, opts)
  data
end

#get_stream_usage_by_sdk_version(source, opts = {}) ⇒ SeriesListRep

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.

Parameters:

  • source (String)

    The source of streaming connections to describe. Must be either &#x60;client&#x60; or &#x60;server&#x60;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :tz (String)

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

  • :sdk (String)

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

  • :version (String)

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

Returns:



1535
1536
1537
1538
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1535

def get_stream_usage_by_sdk_version(source, opts = {})
  data, _status_code, _headers = get_stream_usage_by_sdk_version_with_http_info(source, opts)
  data
end

#get_stream_usage_by_sdk_version_with_http_info(source, opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.

Parameters:

  • source (String)

    The source of streaming connections to describe. Must be either &#x60;client&#x60; or &#x60;server&#x60;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :tz (String)

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

  • :sdk (String)

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

  • :version (String)

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

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1550

def get_stream_usage_by_sdk_version_with_http_info(source, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_stream_usage_by_sdk_version ...'
  end
  # verify the required parameter 'source' is set
  if @api_client.config.client_side_validation && source.nil?
    fail ArgumentError, "Missing the required parameter 'source' when calling AccountUsageBetaApi.get_stream_usage_by_sdk_version"
  end
  # resource path
  local_var_path = '/api/v2/usage/streams/{source}/bysdkversion'.sub('{' + 'source' + '}', CGI.escape(source.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'tz'] = opts[:'tz'] if !opts[:'tz'].nil?
  query_params[:'sdk'] = opts[:'sdk'] if !opts[:'sdk'].nil?
  query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_stream_usage_by_sdk_version",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_stream_usage_by_sdk_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stream_usage_sdkversion(source, opts = {}) ⇒ SdkVersionListRep

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.

Parameters:

  • source (String)

    The source of streaming connections to describe. Must be either &#x60;client&#x60; or &#x60;server&#x60;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1608
1609
1610
1611
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1608

def get_stream_usage_sdkversion(source, opts = {})
  data, _status_code, _headers = get_stream_usage_sdkversion_with_http_info(source, opts)
  data
end

#get_stream_usage_sdkversion_with_http_info(source, opts = {}) ⇒ Array<(SdkVersionListRep, Integer, Hash)>

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.

Parameters:

  • source (String)

    The source of streaming connections to describe. Must be either &#x60;client&#x60; or &#x60;server&#x60;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SdkVersionListRep, Integer, Hash)>)

    SdkVersionListRep data, response status code and response headers



1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1618

def get_stream_usage_sdkversion_with_http_info(source, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_stream_usage_sdkversion ...'
  end
  # verify the required parameter 'source' is set
  if @api_client.config.client_side_validation && source.nil?
    fail ArgumentError, "Missing the required parameter 'source' when calling AccountUsageBetaApi.get_stream_usage_sdkversion"
  end
  # resource path
  local_var_path = '/api/v2/usage/streams/{source}/sdkversions'.sub('{' + 'source' + '}', CGI.escape(source.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SdkVersionListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_stream_usage_sdkversion",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_stream_usage_sdkversion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stream_usage_with_http_info(source, opts = {}) ⇒ Array<(SeriesListRep, Integer, Hash)>

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.

Parameters:

  • source (String)

    The source of streaming connections to describe. Must be either &#x60;client&#x60; or &#x60;server&#x60;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (String)

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

  • :to (String)

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

  • :tz (String)

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

Returns:

  • (Array<(SeriesListRep, Integer, Hash)>)

    SeriesListRep data, response status code and response headers



1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
# File 'lib/launchdarkly_api/api/account_usage_beta_api.rb', line 1474

def get_stream_usage_with_http_info(source, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_stream_usage ...'
  end
  # verify the required parameter 'source' is set
  if @api_client.config.client_side_validation && source.nil?
    fail ArgumentError, "Missing the required parameter 'source' when calling AccountUsageBetaApi.get_stream_usage"
  end
  # resource path
  local_var_path = '/api/v2/usage/streams/{source}'.sub('{' + 'source' + '}', CGI.escape(source.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'tz'] = opts[:'tz'] if !opts[:'tz'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SeriesListRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"AccountUsageBetaApi.get_stream_usage",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_stream_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end