Skip to main content
GET
/
v1
/
analytics
/
buckets
/
{bucket_id}
/
usage
Get Bucket Usage
curl --request GET \
  --url https://api.mixpeek.com/v1/analytics/buckets/{bucket_id}/usage
{
  "bucket_id": "<string>",
  "time_range": {
    "start": "2023-11-07T05:31:56Z",
    "end": "2023-11-07T05:31:56Z"
  },
  "metrics": [
    {
      "time_bucket": "2023-11-07T05:31:56Z",
      "storage_gb_hours": 123,
      "upload_operations": 123,
      "sync_operations": 123,
      "total_credits": 123,
      "estimated_cost_usd": 123
    }
  ],
  "cost_breakdown": {
    "storage_percent": 123,
    "upload_percent": 123,
    "sync_percent": 123,
    "other_percent": 123
  },
  "total_credits": 123,
  "total_cost_usd": 123
}

Headers

Authorization
string

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

X-Namespace
string

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Path Parameters

bucket_id
string
required

Query Parameters

start_date
string<date-time> | null

Start date (UTC)

end_date
string<date-time> | null

End date (UTC)

group_by
string
default:day

Time grouping: hour, day, week, month

Response

Successful Response

Bucket usage and cost analytics response.

bucket_id
string
required

Bucket identifier

time_range
TimeRange · object
required

Query time range

metrics
UsageMetric · object[]
required

Usage metrics

cost_breakdown
CostBreakdown · object
required

Cost breakdown

total_credits
integer
required

Total credits consumed

total_cost_usd
number
required

Total cost in USD