Skip to main content
GET
Get the usage over a period of time for a user per log id.

Authorizations

X-BRONTO-API-KEY
string
header
required

Query Parameters

time_range
string

The relative time range for which to calculate usage data. Time range supported is from minutes to years. For an exact range, use from_ts and to_ts instead.

from_ts
integer

The starting time (unix time in milliseconds) for which to calculate usage data. Must be used together with to_ts. This parameter is not to be used when using time_range.

to_ts
integer

The ending time (unix time in milliseconds) for which to calculate usage data. Must be used together with from_ts. This parameter is incompatible with time_range.

usage_type
enum<string>
default:search

The type of usage to query.

Available options:
search
limit
integer

Returns the top N logs based on the usage. If not provided, the default limit is 50. The maximum limit is 100.

num_of_slices
integer

The num_of_slices parameter defines how the time range is divided into intervals. It is optional, and if not provided, a default value is applied. The default number of slices is 1 minute granularity for up to 12 hours time range and 20 minutes granularity for longer than 12 hours time range up to 720 slices. - default for 20 minutes time window: 20 slices - default for 12 hour time window: 720 slices - default for 1 day time window: 72 slices (1 slice per 20 minutes) - default for 10 days time window: 720 slices (1 slice per 20 minutes) - default for 30 days time window: 720 slices (max number of slices allowed)

metric
enum<string>
default:data

The usage metric to query

Available options:
volume,
latency
delta
boolean

Enables calculation of the difference between the current and previous time range values. When set to true, the response includes a delta object with the computed difference and its relative change. Defaults to false.

delta_time_range
string

The time period for which to query data for delta comparison. Either delta_time_range or both delta_from_ts and delta_to_ts can be provided if delta is enabled. If delta_time_range is provided, it will take precedence

delta_from_ts
integer

The starting unix time in milliseconds for which to query data for delta comparison. Either delta_time_range or both delta_from_ts and delta_to_ts can be provided if delta is enabled. If delta_time_range is provided, it will take precedence.

delta_to_ts
integer

The ending unix time in milliseconds for which to query data for delta comparison. Either delta_time_range or both delta_from_ts and delta_to_ts can be provided if delta is enabled. If delta_time_range is provided, it will take precedence.

Response

Successful response

name
string
Example:

"Usage"

filter
string
Example:

"event_type='log_usage'"

stat
string
Example:

"SUM"

key
string
Example:

"bytes_total"

is_exact
boolean

true if the series result is exact, false if it is an approximation

Example:

true

groups_series
object[]