Governance
Paginate the credits ledger
Cursor-paginated view over credits_ledger. Keyset pagination by (created_at, id) descending, Stripe-style { data, has_more, next_cursor }.
Ownership (a child key is always pinned to its own api_key_id):
- child → its own api_key_id; passing ?api_key_id= for a foreign key returns 403.
- master → the whole organization (sub-keys share the master's user_id); ?api_key_id= is validated for membership (404 anti-enumeration otherwise).
- solo/legacy → the caller's user_id.
The row subset is Zero-Retention-safe: meta (which may carry a filename) is never returned in the clear.
get/api/v1/credits/ledger
Request
- Base URL: https://legal.nexusquantum.legal
- URL: https://legal.nexusquantum.legal/api/v1/credits/ledger
- Auth: HTTP bearer
Query parameters
fromstring date-time
Only entries with created_at >= from (ISO 8601).
tostring date-time
Only entries with created_at <= to (ISO 8601).
kind'purchase' | 'consumption' | 'admin_gift' | 'refund'
Filter by ledger entry kind.
api_key_idstring uuid
Filter to a specific sub-key (403 for a child asking about a foreign key; 404 for a master asking about a non-member key).
cursorstring
Opaque keyset cursor from a previous next_cursor.
limitinteger
Page size (default 50, clamped to 200).
Response
A page of ledger entries.
Example response
{
"data": [
{
"key_prefix": "nlk_ab12"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.