Events API
Your account's event stream. 2 ops: list_events, get_event.
Your account's event stream.
list_events
readList events · POST /api/v1/list_events · scope events:read or GET …?input=
The organization's event log, newest first: every platform event (meal.logged, meal.updated, meal.reviewed, meal.deleted, product.submitted…) with its payload (ids and flags, never food or symptom text), subject, source and time. Filter by type (exact, or a prefix ending in a dot such as "meal.") and subject. Use it to see what changed recently or to catch up (pass after_id to read forward).
curl -X POST https://getgutlog.com/api/v1/list_events \ -H "Authorization: Bearer gutlog_…"npx @meterapp/gutlog list_events{
"type": "object",
"properties": {
"type": {
"description": "An event type, or a prefix ending in \".\" (e.g. \"meal.\").",
"type": "string",
"maxLength": 100
},
"subject_type": {
"description": "meal, product, symptom_log, program…",
"type": "string",
"maxLength": 50
},
"subject_id": {
"type": "string",
"maxLength": 200
},
"after_id": {
"description": "Only events with a larger id, oldest first: to read forward from the last id you saw.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"default": 50,
"description": "Page size, at most 200.",
"type": "integer",
"minimum": 1,
"maximum": 200
},
"offset": {
"default": 0,
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
}
}get_event
readGet event · POST /api/v1/get_event · scope events:read or GET …?input=
One event from the organization's event log by id, with its payload and how each internal consumer handled it (done, failed with the error, dead after its retries).
curl -X POST https://getgutlog.com/api/v1/get_event \ -H "Authorization: Bearer gutlog_…" \ -H "Content-Type: application/json" \ -d '{"id":1}'npx @meterapp/gutlog get_event --json '{"id":1}'{
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
}
},
"required": [
"id"
]
}