{ "openapi": "3.0.3", "info": { "title": "Aether", "description": "something something app", "contact": { "name": "casprine@thesunday.studio" }, "license": { "name": "" }, "version": "0.1.0" }, "paths": { "/v1/activities": { "get": { "tags": [ "Activities" ], "summary": "Get activities grouped by date with detailed breakdowns", "operationId": "get_activities", "parameters": [ { "name": "start_date", "in": "query", "description": "Start date (ISO 8601 format, defaults to 1 year ago)", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "end_date", "in": "query", "description": "End date (ISO 8601 format, defaults to now)", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Activities grouped by date" }, "400": { "description": "Bad request - invalid date format" }, "500": { "description": "Internal server error" } } } }, "/v1/entry": { "get": { "tags": [ "Entries" ], "summary": "Get all entries", "operationId": "get_entries", "parameters": [ { "name": "limit", "in": "query", "description": "Number of entries per page (max 1000)", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Paginated list of entries", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedEntries" } } } }, "500": { "description": "Internal server error" } } }, "post": { "tags": [ "Entries" ], "summary": "Create a new entry", "operationId": "create_entry", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEntryRequest" } } }, "required": true }, "responses": { "200": { "description": "Created entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Entry" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/entry/bulk-create": { "post": { "tags": [ "Entries" ], "summary": "Bulk create entries", "operationId": "bulk_create_entries", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CreateEntryRequest" } } } }, "required": true }, "responses": { "200": { "description": "Created entries", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Entry" } } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/entry/{entryId}/media": { "get": { "tags": [ "Media" ], "summary": "Get image and video media items for an entry.", "operationId": "get_media_items_for_entry", "parameters": [ { "name": "entryId", "in": "path", "description": "Entry ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of media items", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MediaItem" } } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/entry/{id}": { "get": { "tags": [ "Entries" ], "summary": "Get entry by ID", "operationId": "get_entry_by_id", "parameters": [ { "name": "id", "in": "path", "description": "Entry ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Entry found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Entry" } } } }, "404": { "description": "Entry not found" }, "500": { "description": "Internal server error" } } }, "put": { "tags": [ "Entries" ], "summary": "Update an entry", "operationId": "update_entry", "parameters": [ { "name": "id", "in": "path", "description": "Entry ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateEntryRequest" } } }, "required": true }, "responses": { "200": { "description": "Updated entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Entry" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Entry not found" }, "409": { "description": "Conflict: Record was modified by another device" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Entries" ], "summary": "Delete an entry", "operationId": "delete_entry", "parameters": [ { "name": "id", "in": "path", "description": "Entry ID", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Entry deleted" }, "404": { "description": "Entry not found" }, "500": { "description": "Internal server error" } } } }, "/v1/entry/{id}/tags": { "post": { "tags": [ "Entries" ], "summary": "Add tags to an entry", "operationId": "add_tags_to_entry", "parameters": [ { "name": "id", "in": "path", "description": "Entry ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, "required": true }, "responses": { "200": { "description": "Tags added to entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Entry" } } } }, "404": { "description": "Entry or tag not found" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Entries" ], "summary": "Remove tags from an entry", "operationId": "remove_tags_from_entry", "parameters": [ { "name": "id", "in": "path", "description": "Entry ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, "required": true }, "responses": { "200": { "description": "Tags removed from entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Entry" } } } }, "404": { "description": "Entry or tag not found" }, "500": { "description": "Internal server error" } } } }, "/v1/goals": { "get": { "tags": [ "Goals" ], "summary": "Get all goals", "operationId": "get_goals", "parameters": [ { "name": "limit", "in": "query", "description": "Number of goals per page (max 1000)", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Paginated list of goals", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedGoals" } } } }, "500": { "description": "Internal server error" } } }, "post": { "tags": [ "Goals" ], "summary": "Create a new goal", "operationId": "create_goal", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateGoalRequest" } } }, "required": true }, "responses": { "200": { "description": "Created goal", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Goal" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/goals/{goalId}/instances": { "get": { "tags": [ "GoalInstances" ], "summary": "Get goal instances for a goal (with tasks per instance for goal view)", "operationId": "get_goal_instances", "parameters": [ { "name": "goalId", "in": "path", "description": "Goal ID", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Number of instances per page (max 1000)", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Paginated list of goal instances with tasks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedGoalInstancesWithTasks" } } } }, "404": { "description": "Goal not found" }, "500": { "description": "Internal server error" } } } }, "/v1/goals/{goalId}/instances/current": { "get": { "tags": [ "GoalInstances" ], "summary": "Get or create current goal instance", "operationId": "get_current_goal_instance", "parameters": [ { "name": "goalId", "in": "path", "description": "Goal ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Current goal instance", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalInstance" } } } }, "404": { "description": "Goal not found" }, "500": { "description": "Internal server error" } } } }, "/v1/goals/{id}": { "get": { "tags": [ "Goals" ], "summary": "Get goal by ID", "operationId": "get_goal_by_id", "parameters": [ { "name": "id", "in": "path", "description": "Goal ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Goal found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Goal" } } } }, "404": { "description": "Goal not found" }, "500": { "description": "Internal server error" } } }, "put": { "tags": [ "Goals" ], "summary": "Update a goal", "operationId": "update_goal", "parameters": [ { "name": "id", "in": "path", "description": "Goal ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateGoalRequest" } } }, "required": true }, "responses": { "200": { "description": "Updated goal", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Goal" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Goal not found" }, "409": { "description": "Conflict: Goal was modified by another device" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Goals" ], "summary": "Delete a goal", "operationId": "delete_goal", "parameters": [ { "name": "id", "in": "path", "description": "Goal ID", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Goal deleted" }, "404": { "description": "Goal not found" }, "500": { "description": "Internal server error" } } } }, "/v1/goals/{id}/tags": { "post": { "tags": [ "Goals" ], "summary": "Add tags to a goal", "operationId": "add_tags_to_goal", "parameters": [ { "name": "id", "in": "path", "description": "Goal ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, "required": true }, "responses": { "200": { "description": "Tags added to goal", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Goal" } } } }, "404": { "description": "Goal or tag not found" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Goals" ], "summary": "Remove tags from a goal", "operationId": "remove_tags_from_goal", "parameters": [ { "name": "id", "in": "path", "description": "Goal ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, "required": true }, "responses": { "200": { "description": "Tags removed from goal", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Goal" } } } }, "404": { "description": "Goal not found" }, "500": { "description": "Internal server error" } } } }, "/v1/search": { "get": { "tags": [ "Search" ], "summary": "Search across all resources", "operationId": "search_resources", "parameters": [ { "name": "q", "in": "query", "description": "Search query", "required": true, "schema": { "type": "string" } }, { "name": "types", "in": "query", "description": "Comma-separated resource types: entry,task", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "tags", "in": "query", "description": "Comma-separated tag IDs to filter by", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "date_from", "in": "query", "description": "Filter source_updated_at at or after this ISO 8601 value", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "date_to", "in": "query", "description": "Filter source_updated_at at or before this ISO 8601 value", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "limit", "in": "query", "description": "Maximum number of results (default: 50, max: 100)", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Legacy pagination offset", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "cursor", "in": "query", "description": "Opaque pagination cursor", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "mode", "in": "query", "description": "Search mode: keyword, semantic, or hybrid (default: keyword)", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchResponse" } } } }, "400": { "description": "Bad request (empty query)" }, "500": { "description": "Internal server error" } } } }, "/v1/search/embeddings/index": { "post": { "tags": [ "Search" ], "summary": "Index embeddings for all local search documents", "operationId": "index_search_embeddings", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IndexSearchEmbeddingsRequest" } } }, "required": true }, "responses": { "200": { "description": "Search embeddings indexed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchEmbeddingStatus" } } } }, "500": { "description": "Internal server error" } } } }, "/v1/search/embeddings/resource": { "post": { "tags": [ "Search" ], "summary": "Index embeddings for one local search resource", "operationId": "index_search_resource_embeddings", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IndexSearchResourceEmbeddingsRequest" } } }, "required": true }, "responses": { "200": { "description": "Search resource embeddings indexed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchEmbeddingStatus" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/search/embeddings/status": { "get": { "tags": [ "Search" ], "summary": "Get local search embedding index status", "operationId": "get_search_embedding_status", "responses": { "200": { "description": "Search embedding status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchEmbeddingStatus" } } } }, "500": { "description": "Internal server error" } } } }, "/v1/search/index/reindex": { "post": { "tags": [ "Search" ], "summary": "Rebuild the local search document index", "operationId": "reindex_search", "responses": { "200": { "description": "Search index rebuilt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchIndexStatus" } } } }, "500": { "description": "Internal server error" } } } }, "/v1/search/index/resource": { "post": { "tags": [ "Search" ], "summary": "Rebuild one local search document resource", "operationId": "reindex_search_resource", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReindexResourceRequest" } } }, "required": true }, "responses": { "200": { "description": "Resource search index rebuilt" }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/search/index/status": { "get": { "tags": [ "Search" ], "summary": "Get local search document index status", "operationId": "get_search_index_status", "responses": { "200": { "description": "Search index status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchIndexStatus" } } } }, "500": { "description": "Internal server error" } } } }, "/v1/settings": { "get": { "tags": [ "Settings" ], "summary": "Get a setting value", "operationId": "get_setting", "parameters": [ { "name": "key", "in": "query", "description": "Setting key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Setting value", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SettingResponse" } } } }, "400": { "description": "Bad request - key is required" }, "500": { "description": "Internal server error" } } }, "post": { "tags": [ "Settings" ], "summary": "Set a setting value", "operationId": "set_setting", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetSettingRequest" } } }, "required": true }, "responses": { "200": { "description": "Setting updated successfully" }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/settings/all": { "get": { "tags": [ "Settings" ], "summary": "Get all settings", "operationId": "get_all_settings", "responses": { "200": { "description": "All settings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllSettingsResponse" } } } }, "500": { "description": "Internal server error" } } } }, "/v1/sync/configure": { "post": { "tags": [ "Sync" ], "summary": "Configure sync with server URL, server seed phrase, and sync passphrase", "operationId": "configure_sync", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfigureSyncRequest" } } }, "required": true }, "responses": { "200": { "description": "Sync configured successfully" }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/sync/disconnect": { "post": { "tags": [ "Sync" ], "summary": "Disconnect sync (clear configuration)", "operationId": "disconnect_sync", "responses": { "200": { "description": "Sync disconnected successfully" }, "500": { "description": "Internal server error" } } } }, "/v1/sync/media/{mediaId}/ensure": { "post": { "tags": [ "Sync" ], "summary": "For on-demand media: ensure the blob is on disk before the frontend reads/plays it.", "description": "No-op when sync.media_sync_policy is \"auto\" or sync is not configured.", "operationId": "ensure_media_blob", "parameters": [ { "name": "mediaId", "in": "path", "description": "Media ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Media blob ensured" }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/sync/now": { "post": { "tags": [ "Sync" ], "summary": "Trigger a sync operation (pull, apply, push)", "operationId": "sync_now", "responses": { "200": { "description": "Sync completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncStatus" } } } }, "400": { "description": "Bad request - sync not configured" }, "500": { "description": "Internal server error" } } } }, "/v1/sync/reconnect": { "post": { "tags": [ "Sync" ], "summary": "Reconnect sync with sync passphrase", "operationId": "reconnect_sync", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReconnectSyncRequest" } } }, "required": true }, "responses": { "200": { "description": "Sync reconnected", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncStatus" } } } }, "400": { "description": "Bad request - invalid passphrase" }, "500": { "description": "Internal server error" } } } }, "/v1/sync/status": { "get": { "tags": [ "Sync" ], "summary": "Get current sync status", "operationId": "get_sync_status", "responses": { "200": { "description": "Current sync status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncStatus" } } } }, "500": { "description": "Internal server error" } } } }, "/v1/tags": { "get": { "tags": [ "Tags" ], "summary": "Get all tags", "operationId": "get_all_tags", "parameters": [ { "name": "limit", "in": "query", "description": "Number of tags per page (max 1000)", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Paginated list of tags", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedTags" } } } }, "500": { "description": "Internal server error" } } }, "post": { "tags": [ "Tags" ], "summary": "Create a new tag", "operationId": "create_tag", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTagRequest" } } }, "required": true }, "responses": { "200": { "description": "Created tag", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Tag" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/tags/bulk-create": { "post": { "tags": [ "Tags" ], "summary": "Bulk create tags", "operationId": "bulk_create_tags", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CreateTagRequest" } } } }, "required": true }, "responses": { "200": { "description": "Created tags", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/tasks": { "post": { "tags": [ "Tasks" ], "summary": "Create a new task", "operationId": "create_task", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTaskRequest" } } }, "required": true }, "responses": { "200": { "description": "Created task with subtasks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskWithSubtasks" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/tasks/inbox": { "get": { "tags": [ "Tasks" ], "summary": "Get inbox tasks", "operationId": "get_inbox_tasks", "parameters": [ { "name": "limit", "in": "query", "description": "Number of tasks per page (max 1000)", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Paginated list of inbox tasks with subtasks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedTasksWithSubtasks" } } } }, "500": { "description": "Internal server error" } } } }, "/v1/tasks/overdue": { "get": { "tags": [ "Tasks" ], "summary": "Get overdue tasks", "operationId": "get_overdue_tasks", "parameters": [ { "name": "limit", "in": "query", "description": "Number of tasks per page (max 1000)", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Paginated list of overdue tasks with subtasks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedTasksWithSubtasks" } } } }, "500": { "description": "Internal server error" } } } }, "/v1/tasks/{id}": { "get": { "tags": [ "Tasks" ], "summary": "Get task by ID", "operationId": "get_task_by_id", "parameters": [ { "name": "id", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Task found with subtasks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskWithSubtasks" } } } }, "404": { "description": "Task not found" }, "500": { "description": "Internal server error" } } }, "put": { "tags": [ "Tasks" ], "summary": "Update a task", "operationId": "update_task", "parameters": [ { "name": "id", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTaskRequest" } } }, "required": true }, "responses": { "200": { "description": "Updated task with subtasks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskWithSubtasks" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Task not found" }, "409": { "description": "Conflict: Task was modified by another device" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Tasks" ], "summary": "Delete a task", "operationId": "delete_task", "parameters": [ { "name": "id", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Task deleted" }, "404": { "description": "Task not found" }, "500": { "description": "Internal server error" } } } }, "/v1/tasks/{id}/goal": { "post": { "tags": [ "Tasks" ], "summary": "Add goal to a task", "operationId": "add_goal_to_task", "parameters": [ { "name": "id", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddGoalToTaskRequest" } } }, "required": true }, "responses": { "200": { "description": "Goal added to task", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskWithSubtasks" } } } }, "404": { "description": "Task or goal not found" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Tasks" ], "summary": "Remove goal from a task", "operationId": "remove_goal_from_task", "parameters": [ { "name": "id", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Goal removed from task", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskWithSubtasks" } } } }, "404": { "description": "Task not found" }, "500": { "description": "Internal server error" } } } }, "/v1/tasks/{id}/tags": { "post": { "tags": [ "Tasks" ], "summary": "Add tags to a task", "operationId": "add_tags_to_task", "parameters": [ { "name": "id", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, "required": true }, "responses": { "200": { "description": "Tags added to task", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskWithSubtasks" } } } }, "404": { "description": "Task or tag not found" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Tasks" ], "summary": "Remove tags from a task", "operationId": "remove_tags_from_task", "parameters": [ { "name": "id", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, "required": true }, "responses": { "200": { "description": "Tags removed from task", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskWithSubtasks" } } } }, "404": { "description": "Task not found" }, "500": { "description": "Internal server error" } } } }, "/v1/tasks/{taskId}/subtasks": { "get": { "tags": [ "Tasks" ], "summary": "Get subtasks for a task", "operationId": "get_subtasks", "parameters": [ { "name": "taskId", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of subtasks", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SubTask" } } } } }, "404": { "description": "Task not found" }, "500": { "description": "Internal server error" } } }, "post": { "tags": [ "Tasks" ], "summary": "Create a subtask", "operationId": "create_subtask", "parameters": [ { "name": "taskId", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSubTaskRequest" } } }, "required": true }, "responses": { "200": { "description": "Created subtask", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubTask" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Task not found" }, "500": { "description": "Internal server error" } } } }, "/v1/tasks/{taskId}/subtasks/reorder": { "post": { "tags": [ "Tasks" ], "summary": "Reorder subtasks", "operationId": "reorder_subtasks", "parameters": [ { "name": "taskId", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReorderSubTasksRequest" } } }, "required": true }, "responses": { "200": { "description": "Subtasks reordered" }, "404": { "description": "Task not found" }, "500": { "description": "Internal server error" } } } }, "/v1/tasks/{taskId}/subtasks/{subtaskId}": { "put": { "tags": [ "Tasks" ], "summary": "Update a subtask", "operationId": "update_subtask", "parameters": [ { "name": "taskId", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } }, { "name": "subtaskId", "in": "path", "description": "Subtask ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSubTaskRequest" } } }, "required": true }, "responses": { "200": { "description": "Updated subtask", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubTask" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Subtask not found" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Tasks" ], "summary": "Delete a subtask", "operationId": "delete_subtask", "parameters": [ { "name": "taskId", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } }, { "name": "subtaskId", "in": "path", "description": "Subtask ID", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Subtask deleted" }, "404": { "description": "Subtask not found" }, "500": { "description": "Internal server error" } } } }, "/v1/trash/tasks": { "get": { "tags": [ "Trash" ], "summary": "Get all trashed tasks", "operationId": "get_trashed_tasks", "responses": { "200": { "description": "List of deleted tasks", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Task" } } } } }, "500": { "description": "Internal server error" } } } }, "/v1/trash/{id}/restore": { "post": { "tags": [ "Trash" ], "summary": "Restore a deleted task", "operationId": "restore_task", "parameters": [ { "name": "id", "in": "path", "description": "Task ID", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Task restored" }, "404": { "description": "Task not found" }, "500": { "description": "Internal server error" } } } } }, "components": { "schemas": { "Activity": { "type": "object", "description": "Activity model for tracking user actions and audit logging", "required": [ "id", "actionType", "entityType", "entityId", "createdAt" ], "properties": { "actionType": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "entityId": { "type": "string" }, "entityType": { "type": "string" }, "id": { "type": "string" }, "metadata": { "nullable": true } } }, "AddGoalToTaskRequest": { "type": "object", "required": [ "goalId" ], "properties": { "goalId": { "type": "string" } } }, "AllSettingsResponse": { "type": "object", "additionalProperties": { "type": "string" } }, "ConfigureSyncRequest": { "type": "object", "required": [ "server_url", "server_seed_phrase", "sync_passphrase" ], "properties": { "server_seed_phrase": { "type": "string" }, "server_url": { "type": "string" }, "sync_passphrase": { "type": "string" } } }, "CreateEntryRequest": { "type": "object", "required": [ "document" ], "properties": { "date": { "type": "string", "format": "date-time" }, "document": { "type": "string" }, "isArchived": { "type": "boolean", "nullable": true }, "isDeleted": { "type": "boolean", "nullable": true }, "isPinned": { "type": "boolean", "nullable": true } } }, "CreateGoalRequest": { "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string", "nullable": true }, "isNonRecurring": { "type": "boolean", "nullable": true }, "name": { "type": "string" }, "recurrenceAnchor": { "type": "string", "format": "date-time", "nullable": true }, "recurrenceInterval": { "type": "integer", "format": "int32", "nullable": true }, "recurrenceMeta": { "nullable": true }, "recurrenceType": { "type": "string", "nullable": true }, "tagIds": { "type": "array", "items": { "type": "string" } } } }, "CreateSubTaskRequest": { "type": "object", "required": [ "title" ], "properties": { "title": { "type": "string" } } }, "CreateTagRequest": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "CreateTaskRequest": { "type": "object", "required": [ "title" ], "properties": { "description": { "type": "string", "nullable": true }, "dueDate": { "type": "string", "format": "date-time", "nullable": true }, "goalId": { "type": "string", "nullable": true }, "tagIds": { "type": "array", "items": { "type": "string" } }, "title": { "type": "string" } } }, "Entry": { "type": "object", "description": "Entry model", "required": [ "id", "document", "createdAt", "isPinned", "isArchived", "isDeleted", "updatedAt" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "deletedAt": { "type": "string", "format": "date-time", "nullable": true }, "document": { "type": "string" }, "id": { "type": "string" }, "isArchived": { "type": "boolean" }, "isDeleted": { "type": "boolean" }, "isPinned": { "type": "boolean" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" }, "nullable": true }, "updatedAt": { "type": "string", "format": "date-time" } } }, "Goal": { "type": "object", "description": "Goal model", "required": [ "id", "name", "isNonRecurring", "timezone", "createdAt", "updatedAt" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "deletedAt": { "type": "string", "format": "date-time", "nullable": true }, "description": { "type": "string", "nullable": true }, "id": { "type": "string" }, "isNonRecurring": { "type": "boolean" }, "name": { "type": "string" }, "recurrenceAnchor": { "type": "string", "format": "date-time", "nullable": true }, "recurrenceInterval": { "type": "integer", "format": "int32", "nullable": true }, "recurrenceMeta": { "nullable": true }, "recurrenceType": { "type": "string", "nullable": true }, "timezone": { "type": "string" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "GoalInstance": { "type": "object", "description": "GoalInstance model", "required": [ "id", "goalId", "periodStart", "status", "createdAt" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "goalId": { "type": "string" }, "id": { "type": "string" }, "periodEnd": { "type": "string", "format": "date-time", "nullable": true }, "periodStart": { "type": "string", "format": "date-time" }, "status": { "type": "string" } } }, "GoalInstanceWithTasks": { "type": "object", "description": "Goal instance with its tasks (for goal view)", "required": [ "id", "goalId", "periodStart", "status", "createdAt", "tasks" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "goalId": { "type": "string" }, "id": { "type": "string" }, "periodEnd": { "type": "string", "format": "date-time", "nullable": true }, "periodStart": { "type": "string", "format": "date-time" }, "status": { "type": "string" }, "tasks": { "type": "array", "items": { "$ref": "#/components/schemas/TaskWithSubtasks" } } } }, "IndexSearchEmbeddingsRequest": { "type": "object", "properties": { "modelName": { "type": "string", "nullable": true } } }, "IndexSearchResourceEmbeddingsRequest": { "type": "object", "required": [ "resourceType", "resourceId" ], "properties": { "modelName": { "type": "string", "nullable": true }, "resourceId": { "type": "string" }, "resourceType": { "type": "string" } } }, "MediaItem": { "type": "object", "description": "MediaItem model", "required": [ "id", "entityType", "entityId", "mediaType", "filePath", "metadata", "createdAt", "updatedAt" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "entityId": { "type": "string" }, "entityType": { "type": "string" }, "filePath": { "type": "string" }, "id": { "type": "string" }, "mediaType": { "type": "string" }, "metadata": {}, "updatedAt": { "type": "string", "format": "date-time" } } }, "PaginatedEntries": { "type": "object", "description": "Pagination response wrapper optimized for infinite scroll", "required": [ "items", "hasMore" ], "properties": { "hasMore": { "type": "boolean", "description": "Convenience flag for infinite scroll" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/Entry" } }, "nextCursor": { "type": "string", "description": "Next page cursor (null when no more pages)", "nullable": true } } }, "PaginatedGoalInstances": { "type": "object", "description": "Pagination response wrapper optimized for infinite scroll", "required": [ "items", "hasMore" ], "properties": { "hasMore": { "type": "boolean", "description": "Convenience flag for infinite scroll" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/GoalInstance" } }, "nextCursor": { "type": "string", "description": "Next page cursor (null when no more pages)", "nullable": true } } }, "PaginatedGoalInstancesWithTasks": { "type": "object", "description": "Pagination response wrapper optimized for infinite scroll", "required": [ "items", "hasMore" ], "properties": { "hasMore": { "type": "boolean", "description": "Convenience flag for infinite scroll" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/GoalInstanceWithTasks" } }, "nextCursor": { "type": "string", "description": "Next page cursor (null when no more pages)", "nullable": true } } }, "PaginatedGoals": { "type": "object", "description": "Pagination response wrapper optimized for infinite scroll", "required": [ "items", "hasMore" ], "properties": { "hasMore": { "type": "boolean", "description": "Convenience flag for infinite scroll" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/Goal" } }, "nextCursor": { "type": "string", "description": "Next page cursor (null when no more pages)", "nullable": true } } }, "PaginatedTags": { "type": "object", "description": "Pagination response wrapper optimized for infinite scroll", "required": [ "items", "hasMore" ], "properties": { "hasMore": { "type": "boolean", "description": "Convenience flag for infinite scroll" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } }, "nextCursor": { "type": "string", "description": "Next page cursor (null when no more pages)", "nullable": true } } }, "PaginatedTasks": { "type": "object", "description": "Pagination response wrapper optimized for infinite scroll", "required": [ "items", "hasMore" ], "properties": { "hasMore": { "type": "boolean", "description": "Convenience flag for infinite scroll" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/Task" } }, "nextCursor": { "type": "string", "description": "Next page cursor (null when no more pages)", "nullable": true } } }, "PaginatedTasksWithSubtasks": { "type": "object", "description": "Pagination response wrapper optimized for infinite scroll", "required": [ "items", "hasMore" ], "properties": { "hasMore": { "type": "boolean", "description": "Convenience flag for infinite scroll" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/TaskWithSubtasks" } }, "nextCursor": { "type": "string", "description": "Next page cursor (null when no more pages)", "nullable": true } } }, "ReconnectSyncRequest": { "type": "object", "required": [ "sync_passphrase" ], "properties": { "sync_passphrase": { "type": "string" } } }, "ReindexResourceRequest": { "type": "object", "required": [ "resourceType", "resourceId" ], "properties": { "resourceId": { "type": "string" }, "resourceType": { "type": "string" } } }, "ReorderSubTasksRequest": { "type": "object", "required": [ "subTaskIds" ], "properties": { "subTaskIds": { "type": "array", "items": { "type": "string" } } } }, "SearchEmbeddingModelStatus": { "type": "object", "required": [ "modelName", "dimensions", "totalEmbeddings" ], "properties": { "dimensions": { "type": "integer", "format": "int64" }, "modelName": { "type": "string" }, "totalEmbeddings": { "type": "integer", "format": "int64" } } }, "SearchEmbeddingStatus": { "type": "object", "required": [ "totalEmbeddings", "models" ], "properties": { "models": { "type": "array", "items": { "$ref": "#/components/schemas/SearchEmbeddingModelStatus" } }, "totalEmbeddings": { "type": "integer", "format": "int64" } } }, "SearchIndexStatus": { "type": "object", "required": [ "totalDocuments", "entries", "tasks" ], "properties": { "entries": { "type": "integer", "format": "int64" }, "tasks": { "type": "integer", "format": "int64" }, "totalDocuments": { "type": "integer", "format": "int64" } } }, "SearchRequest": { "type": "object", "required": [ "q" ], "properties": { "cursor": { "type": "string", "nullable": true }, "dateFrom": { "type": "string", "nullable": true }, "dateTo": { "type": "string", "nullable": true }, "limit": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 }, "mode": { "type": "string", "nullable": true }, "offset": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 }, "q": { "type": "string" }, "tags": { "type": "string", "nullable": true }, "types": { "type": "string", "nullable": true } } }, "SearchResponse": { "type": "object", "required": [ "results", "total", "hasMore", "query", "mode" ], "properties": { "hasMore": { "type": "boolean" }, "mode": { "type": "string" }, "nextCursor": { "type": "string", "nullable": true }, "query": { "type": "string" }, "results": { "type": "array", "items": { "$ref": "#/components/schemas/SearchResultResponse" } }, "total": { "type": "integer", "minimum": 0 } } }, "SearchResultResponse": { "type": "object", "required": [ "id", "resourceType", "resourceId", "title", "preview", "score", "matchKind", "highlights", "sourceUpdatedAt", "createdAt", "updatedAt" ], "properties": { "createdAt": { "type": "string" }, "highlights": { "type": "array", "items": { "type": "string" } }, "id": { "type": "string" }, "matchKind": { "type": "string" }, "preview": { "type": "string" }, "resourceId": { "type": "string" }, "resourceType": { "type": "string" }, "score": { "type": "number", "format": "double" }, "sourceUpdatedAt": { "type": "string" }, "title": { "type": "string" }, "updatedAt": { "type": "string" } } }, "SetSettingRequest": { "type": "object", "required": [ "key", "value" ], "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "SettingResponse": { "type": "object", "required": [ "key" ], "properties": { "key": { "type": "string" }, "value": { "type": "string", "nullable": true } } }, "SubTask": { "type": "object", "description": "SubTask model", "required": [ "id", "title", "isCompleted", "taskId", "orderIndex", "createdAt", "updatedAt" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "deletedAt": { "type": "string", "format": "date-time", "nullable": true }, "id": { "type": "string" }, "isCompleted": { "type": "boolean" }, "orderIndex": { "type": "integer", "format": "int32" }, "taskId": { "type": "string" }, "title": { "type": "string" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "SyncStatus": { "type": "object", "required": [ "connected", "pending_changes", "needs_passphrase" ], "properties": { "connected": { "type": "boolean" }, "last_sync": { "type": "integer", "format": "int64", "nullable": true }, "needs_passphrase": { "type": "boolean" }, "pending_changes": { "type": "integer", "format": "int32", "minimum": 0 }, "server_url": { "type": "string", "nullable": true } } }, "Tag": { "type": "object", "description": "Tag model", "required": [ "id", "name", "createdAt", "updatedAt" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "deletedAt": { "type": "string", "format": "date-time", "nullable": true }, "id": { "type": "string" }, "name": { "type": "string" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "Task": { "type": "object", "description": "Task model", "required": [ "id", "title", "isCompleted", "createdAt", "updatedAt" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "deletedAt": { "type": "string", "format": "date-time", "nullable": true }, "description": { "type": "string", "nullable": true }, "dueDate": { "type": "string", "format": "date-time", "nullable": true }, "goalId": { "type": "string", "nullable": true }, "goalInstanceId": { "type": "string", "nullable": true }, "id": { "type": "string" }, "isCompleted": { "type": "boolean" }, "subtasks": { "type": "array", "items": { "$ref": "#/components/schemas/SubTask" }, "nullable": true }, "title": { "type": "string" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "TaskWithSubtasks": { "type": "object", "description": "Task with subtasks included", "required": [ "id", "title", "isCompleted", "createdAt", "updatedAt", "subtasks", "tags" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "deletedAt": { "type": "string", "format": "date-time", "nullable": true }, "description": { "type": "string", "nullable": true }, "dueDate": { "type": "string", "format": "date-time", "nullable": true }, "goal": { "allOf": [ { "$ref": "#/components/schemas/Goal" } ], "nullable": true }, "goalId": { "type": "string", "nullable": true }, "goalInstanceId": { "type": "string", "nullable": true }, "id": { "type": "string" }, "isCompleted": { "type": "boolean" }, "subtasks": { "type": "array", "items": { "$ref": "#/components/schemas/SubTask" } }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } }, "title": { "type": "string" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "UpdateEntryRequest": { "type": "object", "required": [ "document" ], "properties": { "document": { "type": "string" }, "isArchived": { "type": "boolean", "nullable": true }, "isDeleted": { "type": "boolean", "nullable": true }, "isPinned": { "type": "boolean", "nullable": true }, "updatedAt": { "type": "string", "format": "date-time", "nullable": true } } }, "UpdateGoalRequest": { "type": "object", "properties": { "description": { "type": "string", "nullable": true }, "isNonRecurring": { "type": "boolean", "nullable": true }, "name": { "type": "string", "nullable": true }, "recurrenceAnchor": { "type": "string", "format": "date-time", "nullable": true }, "recurrenceInterval": { "type": "integer", "format": "int32", "nullable": true }, "recurrenceMeta": { "nullable": true }, "recurrenceType": { "type": "string", "nullable": true }, "tagIds": { "type": "array", "items": { "type": "string" }, "nullable": true }, "updatedAt": { "type": "string", "format": "date-time", "nullable": true } } }, "UpdateSubTaskRequest": { "type": "object", "properties": { "isCompleted": { "type": "boolean", "nullable": true }, "title": { "type": "string", "nullable": true } } }, "UpdateTaskRequest": { "type": "object", "properties": { "description": { "type": "string", "nullable": true }, "dueDate": { "type": "string", "format": "date-time", "nullable": true }, "goalId": { "type": "string", "nullable": true }, "isCompleted": { "type": "boolean", "nullable": true }, "tagIds": { "type": "array", "items": { "type": "string" }, "nullable": true }, "title": { "type": "string", "nullable": true }, "updatedAt": { "type": "string", "format": "date-time", "nullable": true } } } } }, "tags": [ { "name": "Tags", "description": "Tag management endpoints" }, { "name": "Entries", "description": "Entry management endpoints" }, { "name": "Tasks", "description": "Task management endpoints" }, { "name": "Goals", "description": "Goal management endpoints" }, { "name": "GoalInstances", "description": "Goal instance management endpoints" }, { "name": "Trash", "description": "Trash management endpoints" }, { "name": "Activities", "description": "Activity tracking endpoints" }, { "name": "Search", "description": "Search endpoints" }, { "name": "Settings", "description": "Settings management endpoints" }, { "name": "Media", "description": "Image and video media endpoints" }, { "name": "Sync", "description": "Sync management endpoints" } ] }