{ "openapi": "3.0.3", "info": { "title": "Aether", "description": "something something app", "contact": { "name": "you" }, "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/audio": { "post": { "tags": [ "Audio" ], "summary": "Save audio recording to filesystem and database", "operationId": "save_audio_recording", "parameters": [ { "name": "entryId", "in": "path", "description": "Entry ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Audio recording data", "content": { "application/json": { "schema": {} } }, "required": true }, "responses": { "200": { "description": "Media ID of saved audio", "content": { "text/plain": { "schema": { "type": "string" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/audio/{mediaId}": { "get": { "tags": [ "Audio" ], "summary": "Get audio file data", "operationId": "get_audio_data", "parameters": [ { "name": "mediaId", "in": "path", "description": "Media ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Audio file data", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Audio not found" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Audio" ], "summary": "Delete audio recording", "operationId": "delete_audio_recording", "parameters": [ { "name": "mediaId", "in": "path", "description": "Media ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Audio deleted successfully" }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/audio/{mediaId}/metadata": { "get": { "tags": [ "Audio" ], "summary": "Get audio metadata without loading the full file", "operationId": "get_audio_metadata", "parameters": [ { "name": "mediaId", "in": "path", "description": "Media ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Audio metadata", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/crate.db.models.MediaItem" } ], "nullable": true } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/bookmarks": { "get": { "tags": [ "Bookmarks" ], "summary": "Get all bookmarks", "operationId": "get_bookmarks", "parameters": [ { "name": "is_archived", "in": "query", "description": "Filter by archived status", "required": false, "schema": { "type": "boolean", "nullable": true } }, { "name": "tag_ids", "in": "query", "description": "Filter by tag IDs", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "nullable": true } }, { "name": "content_type", "in": "query", "description": "Filter by content type", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "limit", "in": "query", "description": "Number of bookmarks 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 bookmarks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginationResponse" } } } }, "500": { "description": "Internal server error" } } }, "post": { "tags": [ "Bookmarks" ], "summary": "Create a new bookmark", "operationId": "create_bookmark", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBookmarkRequest" } } }, "required": true }, "responses": { "200": { "description": "Created bookmark", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Bookmark" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/bookmarks/extract-metadata": { "get": { "tags": [ "Bookmarks" ], "summary": "Extract metadata from a URL without saving", "operationId": "extract_metadata", "parameters": [ { "name": "url", "in": "query", "description": "URL to extract metadata from", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Extracted metadata", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.utils.metadata.extractor.ExtractedMetadata" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/bookmarks/{id}": { "get": { "tags": [ "Bookmarks" ], "summary": "Get bookmark by ID", "operationId": "get_bookmark_by_id", "parameters": [ { "name": "id", "in": "path", "description": "Bookmark ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Bookmark found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Bookmark" } } } }, "404": { "description": "Bookmark not found" }, "500": { "description": "Internal server error" } } }, "put": { "tags": [ "Bookmarks" ], "summary": "Update a bookmark", "operationId": "update_bookmark", "parameters": [ { "name": "id", "in": "path", "description": "Bookmark ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBookmarkRequest" } } }, "required": true }, "responses": { "200": { "description": "Updated bookmark", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Bookmark" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Bookmark not found" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Bookmarks" ], "summary": "Delete a bookmark", "operationId": "delete_bookmark", "parameters": [ { "name": "id", "in": "path", "description": "Bookmark ID", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Bookmark deleted" }, "404": { "description": "Bookmark not found" }, "500": { "description": "Internal server error" } } } }, "/v1/bookmarks/{id}/tags": { "post": { "tags": [ "Bookmarks" ], "summary": "Add tags to a bookmark", "operationId": "add_tags_to_bookmark", "parameters": [ { "name": "id", "in": "path", "description": "Bookmark ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, "required": true }, "responses": { "200": { "description": "Tags added to bookmark", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Bookmark" } } } }, "404": { "description": "Bookmark or tag not found" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Bookmarks" ], "summary": "Remove tags from a bookmark", "operationId": "remove_tags_from_bookmark", "parameters": [ { "name": "id", "in": "path", "description": "Bookmark ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, "required": true }, "responses": { "200": { "description": "Tags removed from bookmark", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Bookmark" } } } }, "404": { "description": "Bookmark or tag not found" }, "500": { "description": "Internal server error" } } } }, "/v1/canvas": { "get": { "tags": [ "Canvases" ], "summary": "Get all canvases", "operationId": "get_canvases", "parameters": [ { "name": "limit", "in": "query", "description": "Number of canvases 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 canvases", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginationResponse" } } } }, "500": { "description": "Internal server error" } } }, "post": { "tags": [ "Canvases" ], "summary": "Create a new canvas", "operationId": "create_canvas", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCanvasRequest" } } }, "required": true }, "responses": { "200": { "description": "Created canvas", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Canvas" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/canvas/{id}": { "get": { "tags": [ "Canvases" ], "summary": "Get canvas by ID", "operationId": "get_canvas_by_id", "parameters": [ { "name": "id", "in": "path", "description": "Canvas ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Canvas found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Canvas" } } } }, "404": { "description": "Canvas not found" }, "500": { "description": "Internal server error" } } }, "put": { "tags": [ "Canvases" ], "summary": "Update a canvas", "operationId": "update_canvas", "parameters": [ { "name": "id", "in": "path", "description": "Canvas ID", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCanvasRequest" } } }, "required": true }, "responses": { "200": { "description": "Updated canvas", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Canvas" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Canvas not found" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Canvases" ], "summary": "Delete a canvas", "operationId": "delete_canvas", "parameters": [ { "name": "id", "in": "path", "description": "Canvas ID", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Canvas deleted" }, "404": { "description": "Canvas not found" }, "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/PaginationResponse" } } } }, "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/crate.db.models.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/crate.db.models.Entry" } } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/entry/{entryId}/media": { "get": { "tags": [ "Audio" ], "summary": "Get all media items (audio, images, etc.) 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/crate.db.models.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/crate.db.models.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/crate.db.models.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/crate.db.models.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": { "text/plain": { "schema": { "type": "string" } } }, "required": true }, "responses": { "200": { "description": "Tag removed from entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.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/PaginationResponse" } } } }, "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/crate.db.models.Goal" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/goals/{goalId}/instances": { "get": { "tags": [ "GoalInstances" ], "summary": "Get goal instances for a goal", "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", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginationResponse" } } } }, "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/crate.db.models.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/crate.db.models.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/crate.db.models.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/crate.db.models.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/crate.db.models.Goal" } } } }, "404": { "description": "Goal not found" }, "500": { "description": "Internal server error" } } } }, "/v1/links": { "post": { "tags": [ "Links" ], "summary": "Create a link between resources", "operationId": "create_link", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateLinkRequest" } } }, "required": true }, "responses": { "200": { "description": "Created link", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResourceLink" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } }, "delete": { "tags": [ "Links" ], "summary": "Delete a link", "operationId": "delete_link", "parameters": [ { "name": "sourceType", "in": "query", "description": "Source resource type", "required": true, "schema": { "type": "string" } }, { "name": "sourceId", "in": "query", "description": "Source resource ID", "required": true, "schema": { "type": "string" } }, { "name": "targetType", "in": "query", "description": "Target resource type", "required": true, "schema": { "type": "string" } }, { "name": "targetId", "in": "query", "description": "Target resource ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Link deleted" }, "500": { "description": "Internal server error" } } } }, "/v1/links/backlinks": { "get": { "tags": [ "Links" ], "summary": "Get all backlinks to a target resource", "operationId": "get_backlinks", "parameters": [ { "name": "targetType", "in": "query", "description": "Target resource type", "required": true, "schema": { "type": "string" } }, { "name": "targetId", "in": "query", "description": "Target resource ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of backlinks", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BacklinkResponse" } } } } }, "500": { "description": "Internal server error" } } } }, "/v1/links/graph": { "get": { "tags": [ "Links" ], "summary": "Get all links for graph visualization", "operationId": "get_all_links_for_graph", "parameters": [ { "name": "limit", "in": "query", "description": "Number of links 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 links for graph", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginationResponse" } } } }, "500": { "description": "Internal server error" } } } }, "/v1/links/outgoing": { "get": { "tags": [ "Links" ], "summary": "Get all outgoing links from a source resource", "operationId": "get_outgoing_links", "parameters": [ { "name": "sourceType", "in": "query", "description": "Source resource type", "required": true, "schema": { "type": "string" } }, { "name": "sourceId", "in": "query", "description": "Source resource ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of outgoing links", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ResourceLink" } } } } }, "500": { "description": "Internal server error" } } } }, "/v1/links/search": { "get": { "tags": [ "Links" ], "summary": "Search for resources to link (for autocomplete)", "operationId": "search_linkable_resources", "parameters": [ { "name": "q", "in": "query", "description": "Search query", "required": true, "schema": { "type": "string" } }, { "name": "types", "in": "query", "description": "Comma-separated resource types to filter", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "limit", "in": "query", "description": "Maximum number of results (default: 20)", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } } ], "responses": { "200": { "description": "List of linkable resources", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LinkableResource" } } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/links/sync": { "post": { "tags": [ "Links" ], "summary": "Sync links from content (extract and create/update links)", "operationId": "sync_links_from_content", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncLinksRequest" } } }, "required": true }, "responses": { "200": { "description": "Links synced" }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/search": { "get": { "tags": [ "Search" ], "summary": "Search across all resources", "operationId": "search", "parameters": [ { "name": "q", "in": "query", "description": "Search query", "required": true, "schema": { "type": "string" } }, { "name": "types", "in": "query", "description": "Comma-separated resource types: entry,task,subtask,goal,tag", "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": "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": "Pagination offset", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "mode", "in": "query", "description": "Search mode: fuzzy, similar, or hybrid (default: fuzzy)", "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/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 and 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 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/PaginationResponse" } } } }, "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/crate.db.models.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/crate.db.models.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", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Task" } } } }, "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", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginationResponse" } } } }, "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", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginationResponse" } } } }, "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", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Task" } } } }, "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", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crate.db.models.Task" } } } }, "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/crate.db.models.Task" } } } }, "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/crate.db.models.Task" } } } }, "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" }, "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" }, "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/crate.db.models.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/crate.db.models.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/crate.db.models.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/transcription": { "post": { "tags": [ "Transcription" ], "summary": "Start transcription for an audio file", "operationId": "start_transcription", "parameters": [ { "name": "mediaId", "in": "path", "description": "Media ID", "required": true, "schema": { "type": "string" } }, { "name": "providerName", "in": "query", "description": "Provider name (optional)", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Transcription ID", "content": { "text/plain": { "schema": { "type": "string" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/transcription/by-id/{transcriptionId}": { "get": { "tags": [ "Transcription" ], "summary": "Get a specific transcription by ID", "operationId": "get_transcription_by_id", "parameters": [ { "name": "transcriptionId", "in": "path", "description": "Transcription ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Transcription", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/crate.db.models.AudioTranscription" } ], "nullable": true } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/transcription/models": { "get": { "tags": [ "Transcription" ], "summary": "List available Whisper models", "operationId": "list_available_models", "responses": { "200": { "description": "List of models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ModelInfo" } } } } }, "500": { "description": "Internal server error" } } } }, "/v1/transcription/models/download": { "post": { "tags": [ "Transcription" ], "summary": "Download a Whisper model", "operationId": "download_model", "parameters": [ { "name": "modelSize", "in": "path", "description": "Model size", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Download status", "content": { "text/plain": { "schema": { "type": "string" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/transcription/models/verify": { "post": { "tags": [ "Transcription" ], "summary": "Verify model integrity", "operationId": "verify_model", "parameters": [ { "name": "modelSize", "in": "path", "description": "Model size", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Verification result", "content": { "text/plain": { "schema": { "type": "boolean" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/transcription/models/{modelSize}": { "delete": { "tags": [ "Transcription" ], "summary": "Delete a downloaded model", "operationId": "delete_model", "parameters": [ { "name": "modelSize", "in": "path", "description": "Model size", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Model deleted successfully" }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/transcription/providers": { "get": { "tags": [ "Transcription" ], "summary": "List available providers and their status", "operationId": "list_providers", "responses": { "200": { "description": "List of providers", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProviderInfo" } } } } }, "500": { "description": "Internal server error" } } } }, "/v1/transcription/set-active": { "post": { "tags": [ "Transcription" ], "summary": "Set active transcription", "operationId": "set_active_transcription", "parameters": [ { "name": "transcriptionId", "in": "path", "description": "Transcription ID", "required": true, "schema": { "type": "string" } }, { "name": "mediaId", "in": "path", "description": "Media ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Transcription set as active" }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/transcription/validate-provider": { "post": { "tags": [ "Transcription" ], "summary": "Validate provider configuration", "operationId": "validate_provider", "parameters": [ { "name": "providerName", "in": "path", "description": "Provider name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Validation result", "content": { "text/plain": { "schema": { "type": "boolean" } } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal server error" } } } }, "/v1/transcription/{mediaId}": { "get": { "tags": [ "Transcription" ], "summary": "Get all transcriptions for an audio file", "operationId": "get_transcriptions", "parameters": [ { "name": "mediaId", "in": "path", "description": "Media ID", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Number of transcriptions 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 transcriptions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginationResponse" } } } }, "400": { "description": "Bad request" }, "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/crate.db.models.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" } } }, "AddTagsToBookmarkRequest": { "type": "object", "description": "Request to add tags to a bookmark", "required": [ "tag_ids" ], "properties": { "tag_ids": { "type": "array", "items": { "type": "string" } } } }, "AllSettingsResponse": { "type": "object", "additionalProperties": { "type": "string" } }, "AudioTranscription": { "type": "object", "description": "AudioTranscription model", "required": [ "id", "mediaId", "transcriptionText", "provider", "status", "isActive", "createdAt" ], "properties": { "confidenceScore": { "type": "number", "format": "float", "nullable": true }, "createdAt": { "type": "string", "format": "date-time" }, "errorMessage": { "type": "string", "nullable": true }, "id": { "type": "string" }, "isActive": { "type": "boolean" }, "mediaId": { "type": "string" }, "provider": { "type": "string" }, "providerConfig": { "nullable": true }, "status": { "type": "string" }, "transcriptionText": { "type": "string" } } }, "BacklinkResponse": { "type": "object", "description": "Response for backlinks", "required": [ "link" ], "properties": { "link": { "$ref": "#/components/schemas/ResourceLink" }, "sourceTitle": { "type": "string", "nullable": true } } }, "Bookmark": { "type": "object", "description": "Bookmark model", "required": [ "id", "url", "isArchived", "isDeleted", "createdAt", "updatedAt" ], "properties": { "author": { "type": "string", "nullable": true }, "contentType": { "type": "string", "nullable": true }, "createdAt": { "type": "string", "format": "date-time" }, "deletedAt": { "type": "string", "format": "date-time", "nullable": true }, "description": { "type": "string", "nullable": true }, "faviconUrl": { "type": "string", "nullable": true }, "id": { "type": "string" }, "imageUrl": { "type": "string", "nullable": true }, "isArchived": { "type": "boolean" }, "isDeleted": { "type": "boolean" }, "metadataJson": { "nullable": true }, "publishedAt": { "type": "string", "format": "date-time", "nullable": true }, "siteName": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "updatedAt": { "type": "string", "format": "date-time" }, "url": { "type": "string" } } }, "Canvas": { "type": "object", "description": "Canvas model for storing JSON Canvas-compliant canvas data", "required": [ "id", "name", "canvasData", "createdAt", "updatedAt" ], "properties": { "canvasData": {}, "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" } } }, "ConfigureSyncRequest": { "type": "object", "required": [ "server_url", "passphrase" ], "properties": { "passphrase": { "type": "string" }, "server_url": { "type": "string" } } }, "CreateBookmarkRequest": { "type": "object", "required": [ "url" ], "properties": { "tagIds": { "type": "array", "items": { "type": "string" }, "nullable": true }, "url": { "type": "string" } } }, "CreateCanvasRequest": { "type": "object", "description": "Request to create a canvas", "required": [ "name" ], "properties": { "canvasData": { "nullable": true }, "name": { "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" } } } }, "CreateLinkRequest": { "type": "object", "description": "Request to create a link", "required": [ "sourceType", "sourceId", "targetType", "targetId" ], "properties": { "linkText": { "type": "string", "nullable": true }, "sourceId": { "type": "string" }, "sourceType": { "type": "string" }, "targetId": { "type": "string" }, "targetType": { "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" }, "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" } } }, "LinkableResource": { "type": "object", "description": "Response for linkable resource search", "required": [ "id", "resourceType", "title" ], "properties": { "id": { "type": "string" }, "preview": { "type": "string", "nullable": true }, "resourceType": { "type": "string" }, "title": { "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" } } }, "ModelInfo": { "type": "object", "required": [ "name", "size", "file_size", "download_url", "is_downloaded" ], "properties": { "download_url": { "type": "string" }, "file_size": { "type": "integer", "format": "int64", "minimum": 0 }, "is_downloaded": { "type": "boolean" }, "name": { "type": "string" }, "size": { "type": "string" } } }, "PaginationResponse": { "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/T" } }, "nextCursor": { "type": "string", "description": "Next page cursor (null when no more pages)", "nullable": true } } }, "ProviderInfo": { "type": "object", "required": [ "name", "display_name", "requires_api_key", "requires_download", "status" ], "properties": { "display_name": { "type": "string" }, "error_message": { "type": "string", "nullable": true }, "name": { "type": "string" }, "requires_api_key": { "type": "boolean" }, "requires_download": { "type": "boolean" }, "status": { "type": "string" } } }, "ReconnectSyncRequest": { "type": "object", "required": [ "passphrase" ], "properties": { "passphrase": { "type": "string" } } }, "RemoveTagsFromBookmarkRequest": { "type": "object", "description": "Request to remove tags from a bookmark", "required": [ "tag_ids" ], "properties": { "tag_ids": { "type": "array", "items": { "type": "string" } } } }, "ReorderSubTasksRequest": { "type": "object", "required": [ "subTaskIds" ], "properties": { "subTaskIds": { "type": "array", "items": { "type": "string" } } } }, "ResourceLink": { "type": "object", "description": "ResourceLink model for bidirectional linking between resources", "required": [ "id", "sourceType", "sourceId", "targetType", "targetId", "createdAt" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "linkText": { "type": "string", "nullable": true }, "sourceId": { "type": "string" }, "sourceType": { "type": "string" }, "targetId": { "type": "string" }, "targetType": { "type": "string" } } }, "SaveAudioRecordingRequest": { "type": "object", "description": "Request to save audio recording", "required": [ "entryId", "audioData", "duration", "format" ], "properties": { "audioData": { "type": "string", "format": "binary" }, "autoTranscribe": { "type": "boolean", "nullable": true }, "duration": { "type": "number", "format": "float" }, "entryId": { "type": "string" }, "format": { "type": "string" } } }, "SearchRequest": { "type": "object", "required": [ "q" ], "properties": { "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", "query", "mode" ], "properties": { "mode": { "type": "string" }, "query": { "type": "string" }, "results": { "type": "array", "items": { "$ref": "#/components/schemas/SearchResultResponse" } }, "total": { "type": "integer", "minimum": 0 } } }, "SetActiveTranscriptionRequest": { "type": "object", "description": "Request to set active transcription", "required": [ "transcriptionId", "mediaId" ], "properties": { "mediaId": { "type": "string" }, "transcriptionId": { "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" } } }, "SyncLinksRequest": { "type": "object", "description": "Request to sync links from content", "required": [ "sourceType", "sourceId", "content" ], "properties": { "content": { "type": "string" }, "sourceId": { "type": "string" }, "sourceType": { "type": "string" } } }, "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", "description": "True when server_url is in memory but passphrase is not (e.g. after app restart)." }, "pending_changes": { "type": "integer", "format": "int32", "minimum": 0 } } }, "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" }, "title": { "type": "string" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "UpdateBookmarkRequest": { "type": "object", "properties": { "author": { "type": "string", "nullable": true }, "contentType": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "faviconUrl": { "type": "string", "nullable": true }, "imageUrl": { "type": "string", "nullable": true }, "isArchived": { "type": "boolean", "nullable": true }, "metadataJson": { "nullable": true }, "publishedAt": { "type": "string", "format": "date-time", "nullable": true }, "siteName": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true } } }, "UpdateCanvasRequest": { "type": "object", "description": "Request to update a canvas", "properties": { "canvasData": { "nullable": true }, "name": { "type": "string", "nullable": true } } }, "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 } } }, "ValidateProviderRequest": { "type": "object", "description": "Request to validate provider", "required": [ "providerName" ], "properties": { "providerName": { "type": "string" } } } } }, "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": "Links", "description": "Resource linking endpoints" }, { "name": "Settings", "description": "Settings management endpoints" }, { "name": "Audio", "description": "Audio recording and playback endpoints" }, { "name": "Transcription", "description": "Audio transcription endpoints" }, { "name": "Sync", "description": "Sync management endpoints" }, { "name": "Bookmarks", "description": "Bookmark management endpoints" }, { "name": "Canvases", "description": "Canvas management endpoints" } ] }