Skip to content

Audit Log

Every mutation in Thogits is recorded in an immutable audit log. This provides a complete history of what changed, when, and to which entities.

FieldTypeDescription
event_idULIDUnique identifier for this event
event_typeStringWhat happened (see below)
entity_typeStringThe type of entity affected ("thogit" or "tag")
thogit_idString (optional)The thogit involved, if applicable
tag_idString (optional)The tag involved, if applicable
detailsJSONOperation-specific data (before/after values, field changes, etc.)
created_atISO 8601 datetimeWhen the event occurred
Event TypeDescription
thogit_createdA new thogit was created
thogit_updatedA thogit’s name or description was changed
thogit_deletedA thogit was deleted
tag_createdA new tag was created
tag_updatedA tag’s fields or metadata were changed
tag_deletedA tag was deleted
tag_appliedA tag was applied to a thogit
tag_removedA tag was removed from a thogit
tag_values_updatedField values for a tag on a thogit were changed

Use POST /api/audit-log with a query object:

{
"limit": 50,
"after": "2025-04-01T00:00:00Z",
"before": "2025-04-07T00:00:00Z",
"thogit_ids": ["01JQXK6V9XCSV5K9Z1MQSK5RBT"],
"tag_ids": ["01JQA4N8E3KXYZ..."],
"event_types": ["tag_applied", "tag_values_updated"]
}

All query fields are optional. When multiple fields are provided, they are AND-combined.

Query FieldTypeDescription
limitNumber (optional)Max results to return (default 50, max 1000)
afterISO 8601 datetimeOnly events after this time
beforeISO 8601 datetimeOnly events before this time
thogit_idsString[]Filter to events involving these thogits
tag_idsString[]Filter to events involving these tags
event_typesString[]Filter to specific event types

Results are returned in reverse chronological order (newest first).

[
{
"event_id": "01JRWZ...",
"event_type": "tag_values_updated",
"entity_type": "thogit",
"thogit_id": "01JQXK6V9XCSV5K9Z1MQSK5RBT",
"tag_id": "01JQA4N8E3KXYZ...",
"details": {
"fields_changed": ["status"],
"old_values": { "status": { "variant": "Todo" } },
"new_values": { "status": { "variant": "InProgress" } }
},
"created_at": "2025-04-06T14:23:00Z"
},
{
"event_id": "01JRWY...",
"event_type": "tag_applied",
"entity_type": "thogit",
"thogit_id": "01JQXK6V9XCSV5K9Z1MQSK5RBT",
"tag_id": "01JQA4N8E3KXYZ...",
"details": {
"tag_name": "Task",
"initial_values": { "status": { "variant": "Todo" } }
},
"created_at": "2025-04-06T10:15:00Z"
}
]

Recent activity on a thogit:

{
"thogit_ids": ["01JQXK6V9XCSV5K9Z1MQSK5RBT"],
"limit": 20
}

All tag deletions in the last week:

{
"event_types": ["tag_deleted"],
"after": "2025-03-30T00:00:00Z"
}

Everything that happened to a specific tag:

{
"tag_ids": ["01JQA4N8E3KXYZ..."],
"event_types": ["tag_created", "tag_updated", "tag_deleted", "tag_applied", "tag_removed"]
}