Skip to content

Views

Views are named, saved filter presets that let you organize your workspace into reusable query perspectives. Each view stores a filter along with display settings.

FieldTypeDescription
view_idULIDUnique identifier
nameStringDisplay name
iconStringEmoji icon (e.g., "🔥", "📋")
filterJSONA ThogitFilter expression
view_typeStringDisplay type, currently "list"
settingsJSONAdditional display configuration (e.g., sorting, grouping)
created_atISO 8601 stringWhen the view was created
updated_atISO 8601 stringWhen the view was last modified
POST /api/views
{
"name": "Active Tasks",
"icon": "🔥",
"filter": {
"and": [
{ "has_tag": "Task" },
{ "not": { "Task.status": { "match": "Done" } } }
]
},
"view_type": "list",
"settings": {}
}

Response:

{
"view_id": "01JRWX...",
"name": "Active Tasks",
"icon": "🔥",
"filter": {
"and": [
{ "has_tag": "01JQA4N8E3..." },
{ "not": { "01JQA4N8E3....status": { "match": "Done" } } }
]
},
"view_type": "list",
"settings": {},
"created_at": "2025-04-06T12:00:00Z",
"updated_at": "2025-04-06T12:00:00Z"
}
GET /api/views

Returns all views for the current user, ordered by creation date.

PUT /api/views/:view_id
{
"name": "Active Tasks (High Priority)",
"icon": "🔥",
"filter": {
"and": [
{ "has_tag": "Task" },
{ "Task.status": { "neq": "Done" } },
{ "Task.priority": { "in": ["High", "Critical"] } }
]
},
"settings": {}
}
DELETE /api/views/:view_id

Deleting a view does not affect any thogits. It only removes the saved filter preset.

The settings field is a flexible JSON object for view-specific configuration. For list views, this can include sorting and grouping preferences:

{
"settings": {
"sort_by": "Task.due_date",
"sort_direction": "asc",
"group_by": "Task.status"
}
}

Currently, views support the "list" type. The schema is designed to accommodate additional view types (calendar, kanban, etc.) in the future, each with their own settings structure.