Skip to main content
GET
Retrieve brick usage

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Path Parameters

brick_id
string
required
Pattern: ^([a-zA-Z\d\-]+)$
subscription_id
string
required
Pattern: ^([a-zA-Z\d\-]+)$

Query Parameters

currentPeriod
enum<string>

Set to '1' or 'true' to only return usage for the current period.

Available options:
1,
True,
true
from
string

Filter periods starting on or after this date. Accepts ISO 8601 format (e.g., '2024-01-01' or '2024-01-01T00:00:00'). Date-only values are interpreted in the system timezone.

to
string

Filter periods ending before this date. To include periods ending on a specific date, specify the following day. Accepts ISO 8601 format (e.g., '2024-12-31' or '2024-12-31T23:59:59'). Date-only values are interpreted in the system timezone. Example: to=2025-05-01 includes periods through April 30.

Response

Brick utilization serializer for utilization API.

starts_at
string<date-time>
required

The period's start date and time

ends_at
string<date-time>
required

The period's end date and time

subscription_id
string<uuid>
required

The unique identifier of the subscription

brick_id
string<uuid>
required

The unique identifier of the brick within the subscription

brick_name
string
required

The display name of the brick

pre_commitment
integer
required

The pre-committed amount of units for this brick. Will be 0 if no pre-commitment is set.

used
number<double>
required

The number of units that have been used so far. Returns an integer for whole number quantities or a decimal for fractional usage (e.g. 99.5).

Required range: -100000000000000 < x < 100000000000000
overages
number<double>
required

The number of units that exceeded the pre-commitment. Returns an integer for whole number quantities or a decimal for fractional usage. Will be 0 if usage has not exceeded pre-commitment, if no pre-commitment is set, or if this is a pool brick (overages only appear on the individual bricks, not on the pool itself).

Required range: -100000000000000 < x < 100000000000000
remaining
number<double>
required

The number of units remaining in the pre-commitment. Returns an integer for whole number quantities or a decimal for fractional usage. Can be negative if usage exceeds pre-commitment.

Required range: -100000000000000 < x < 100000000000000
unit
string
required

The unit of measurement for this brick (e.g., 'API calls', 'GB', etc.). Defaults to 'units' if not specified.

overage_rate
string<decimal> | null

The cost per overage unit. Multiply overages * overage_rate to get total overage cost. Will be null if no overages, no overage pricing configured, or if this is a pool brick (overage rates only appear on the individual bricks, not on the pool itself).

Pattern: ^-?\d{0,10}(?:\.\d{0,10})?$
pre_commitment_schedule
enum<string> | null

The pre-commitment schedule for this brick.

  • ALL_UPFRONT - All upfront
  • MONTHLY - Monthly
  • QUARTERLY - Quarterly
  • SEMI_ANNUALLY - Semi-annually
  • ANNUALLY - Annually
Available options:
ALL_UPFRONT,
MONTHLY,
QUARTERLY,
SEMI_ANNUALLY,
ANNUALLY,
null