Skip to main content
GET
/
subscriptions
/
{subscription_id}
/
bricks
/
{brick_id}
/
usage
/
series
Retrieve brick usage time series
curl --request GET \
  --url https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/bricks/{brick_id}/usage/series \
  --header 'X-SALESBRICKS-KEY: <api-key>'
{
  "subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "brick_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "brick_name": "<string>",
  "unit": "<string>",
  "buckets": [
    {
      "starts_at": "2023-11-07T05:31:56Z",
      "ends_at": "2023-11-07T05:31:56Z",
      "count": 0
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.salesbricks.com/llms.txt

Use this file to discover all available pages before exploring further.

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

from
string

Start of the range (inclusive). ISO 8601 (YYYY-MM-DD or full datetime). Date-only values are interpreted in the subscription's time zone. Defaults to the subscription's current order start date.

to
string

End of the range (exclusive). ISO 8601. Defaults to the current time. Must be after from.

window
enum<string>

Bucket size. Defaults to 'day'.

Available options:
day,
hour,
month,
week

Response

Windowed usage time series for a brick. Decoupled from billing periods and commitment-period concepts (pre-commitment, remaining, overages).

subscription_id
string<uuid>
required
brick_id
string<uuid>
required
brick_name
string
required
unit
string
required

The unit of measurement for this brick (e.g., 'API calls'). Defaults to 'Unit'.

window
enum<string>
required

The bucket size: hour, day, week, or month.

  • hour - hour
  • day - day
  • week - week
  • month - month
Available options:
hour,
day,
week,
month
buckets
object[]
required