Skip to main content
GET
/
api
/
assets
/
counts
Get asset counts
curl --request GET \
  --url https://api.example.com/api/assets/counts
{
  "data": [
    {
      "time_bucket": "2023-11-07T05:31:56Z",
      "count": 123
    }
  ],
  "has_more": true
}

Query Parameters

library_id
string | null

Library to count assets in (optional)

group_by
string
default:month

Time period to group counts by. Currently only 'month' is supported.

album_id
string | null

Filter by assets in a specific album

person_id
string | null

Filter by assets associated with a specific person ID

local_datetime_after
string<date-time> | null

Only include assets with local_datetime after this value (ISO 8601). Naive values compare directly against local_datetime; timezone-aware values are converted to UTC and compared against local_datetime adjusted by its stored offset.

local_datetime_before
string<date-time> | null

Only include assets with local_datetime before this value (ISO 8601). Naive values compare directly against local_datetime; timezone-aware values are converted to UTC and compared against local_datetime adjusted by its stored offset. Use the last time_bucket from a previous response to paginate.

limit
integer
default:100

Maximum number of time buckets to return

Required range: 1 <= x <= 1000

Response

Successful Response

data
TimeBucketCount · object[]
required
has_more
boolean
required