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.
Entry Structure
Section titled “Entry Structure”| Field | Type | Description |
|---|---|---|
event_id | ULID | Unique identifier for this event |
event_type | String | What happened (see below) |
entity_type | String | The type of entity affected ("thogit" or "tag") |
thogit_id | String (optional) | The thogit involved, if applicable |
tag_id | String (optional) | The tag involved, if applicable |
details | JSON | Operation-specific data (before/after values, field changes, etc.) |
created_at | ISO 8601 datetime | When the event occurred |
Event Types
Section titled “Event Types”| Event Type | Description |
|---|---|
thogit_created | A new thogit was created |
thogit_updated | A thogit’s name or description was changed |
thogit_deleted | A thogit was deleted |
tag_created | A new tag was created |
tag_updated | A tag’s fields or metadata were changed |
tag_deleted | A tag was deleted |
tag_applied | A tag was applied to a thogit |
tag_removed | A tag was removed from a thogit |
tag_values_updated | Field values for a tag on a thogit were changed |
Querying the Audit Log
Section titled “Querying the Audit Log”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 Field | Type | Description |
|---|---|---|
limit | Number (optional) | Max results to return (default 50, max 1000) |
after | ISO 8601 datetime | Only events after this time |
before | ISO 8601 datetime | Only events before this time |
thogit_ids | String[] | Filter to events involving these thogits |
tag_ids | String[] | Filter to events involving these tags |
event_types | String[] | Filter to specific event types |
Results are returned in reverse chronological order (newest first).
Example Response
Section titled “Example Response”[ { "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" }]Common Queries
Section titled “Common Queries”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"]}