Page through the usage-event ledger
GET
/v1/usage/events
const url = 'https://api.vocapable.com/v1/usage/events?limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.vocapable.com/v1/usage/events?limit=50' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
Limit
integer
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
CursorPage[UsageEventSummary]
object
data
required
Data
Array<object>
UsageEventSummaryOne ledger row. Append-only - there is no update or delete surface anywhere.
object
id
required
Id
string
meter
required
Meter
string
quantity
required
Quantity
string
occurred_at
required
Occurred At
string format: date-time
attributes
Attributes
object
key
additional properties
any
created_at
required
Created At
string format: date-time
has_more
Has More
boolean
Example
{ "data": [ { "meter": "telephony_minutes" } ], "has_more": false}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}