Skip to main content
GET
Get service connections usage

Authorizations

Authorization
string
header
required

Query Parameters

from
string<string>

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

to
string<string>

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

projectKey
string<string>

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

environmentKey
string<string>

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

connectionType
string<string>

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

relayVersion
string<string>

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

sdkName
string<string>

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

sdkVersion
string<string>

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

sdkType
string<string>

Deprecated. This endpoint reports server-side connections only, so server is the only value that returns data and omitting the parameter is equivalent. Any other value returns an empty series. To report client-side connections, use GET /api/v2/usage/streams/{source}.

sdkAppId
string<string>

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

groupBy
string<string>

If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: projectId, environmentId, connectionType, relayVersion, sdkName, sdkVersion, sdkAppId.
sdkType is no longer offered: this endpoint reports server-side connections only, so grouping by it returns a single group. It is still accepted, for compatibility.

aggregationType
string<string>

Specifies the aggregation method. Defaults to month_to_date.
Valid values: month_to_date, incremental.

granularity
string<string>

Specifies the data granularity. Defaults to daily. monthly granularity is only supported with the month_to_date aggregation type.
Valid values: daily, hourly, monthly.

Response

Usage response

The location and content type of related resources

metadata
object[]
required

Metadata about each series

series
object[]
required

An array of data points with timestamps. Each element of the array is an object with a 'time' field, whose value is the timestamp, and one or more key fields. If there are multiple key fields, they are labeled '0', '1', and so on, and are explained in the metadata.

Example:
projectedSeries
object[]

Cumulative projected usage by day for the full billing period, when available. Each element matches the structure of series: an object with a 'time' field and a '0' value field. The projected (non-actual) portion begins where the actual series ends.

Example: