{ "swagger": "2.0", "info": { "description": "API for CCSync - Web Interface + Sync Server for Taskwarrior 3.0 and Higher\nA self-hosted solution for syncing and managing your tasks anywhere, anytime.", "title": "CCSync API", "contact": { "name": "API Support", "url": "https://github.com/CCExtractor/ccsync" }, "license": { "name": "MIT", "url": "https://github.com/CCExtractor/ccsync/blob/main/LICENSE" }, "version": "1.0" }, "host": "localhost:8000", "basePath": "/", "paths": { "/add-task": { "post": { "description": "Add a new task to Taskwarrior for a specific user", "consumes": ["application/json"], "produces": ["application/json"], "tags": ["Tasks"], "summary": "Add a new task", "parameters": [ { "description": "Task details", "name": "task", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.AddTaskRequestBody" } } ], "responses": { "202": { "description": "Task accepted for processing", "schema": { "type": "string" } }, "400": { "description": "Bad request - invalid input or missing required fields", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } } } } }, "/api/user": { "get": { "description": "Retrieve user information from the session", "consumes": ["application/json"], "produces": ["application/json"], "tags": ["Auth"], "summary": "Get user information", "responses": { "200": { "description": "User information including email, id, uuid, and encryption_secret", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "No user info available - user not authenticated", "schema": { "type": "string" } } } } }, "/auth/callback": { "get": { "description": "Handles the OAuth callback and creates user session", "consumes": ["application/json"], "produces": ["application/json"], "tags": ["Auth"], "summary": "OAuth callback handler", "parameters": [ { "type": "string", "description": "OAuth authorization code", "name": "code", "in": "query", "required": true } ], "responses": { "303": { "description": "Redirect to frontend home page", "schema": { "type": "string" } }, "400": { "description": "Bad request", "schema": { "type": "string" } }, "500": { "description": "Internal server error", "schema": { "type": "string" } } } } }, "/auth/logout": { "get": { "description": "Logout user and delete session", "consumes": ["application/json"], "produces": ["application/json"], "tags": ["Auth"], "summary": "Logout user", "responses": { "200": { "description": "Successfully logged out", "schema": { "type": "string" } }, "500": { "description": "Internal server error", "schema": { "type": "string" } } } } }, "/auth/oauth": { "get": { "description": "Redirects user to Google OAuth login page", "consumes": ["application/json"], "produces": ["application/json"], "tags": ["Auth"], "summary": "Initiate OAuth login", "responses": { "307": { "description": "Redirect to OAuth provider", "schema": { "type": "string" } } } } }, "/complete-task": { "post": { "description": "Mark a task as completed in Taskwarrior", "consumes": ["application/json"], "produces": ["application/json"], "tags": ["Tasks"], "summary": "Complete a task", "parameters": [ { "description": "Task completion details", "name": "task", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.CompleteTaskRequestBody" } } ], "responses": { "202": { "description": "Task completion accepted for processing", "schema": { "type": "string" } }, "400": { "description": "Bad request - invalid input or missing taskuuid", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } } } } }, "/delete-task": { "post": { "description": "Delete a task from Taskwarrior", "consumes": ["application/json"], "produces": ["application/json"], "tags": ["Tasks"], "summary": "Delete a task", "parameters": [ { "description": "Task deletion details", "name": "task", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.DeleteTaskRequestBody" } } ], "responses": { "202": { "description": "Task deletion accepted for processing", "schema": { "type": "string" } }, "400": { "description": "Bad request - invalid input or missing taskuuid", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } } } } }, "/edit-task": { "post": { "description": "Edit task description and tags in Taskwarrior", "consumes": ["application/json"], "produces": ["application/json"], "tags": ["Tasks"], "summary": "Edit a task", "parameters": [ { "description": "Task edit details", "name": "task", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.EditTaskRequestBody" } } ], "responses": { "202": { "description": "Task edit accepted for processing", "schema": { "type": "string" } }, "400": { "description": "Bad request - invalid input or missing taskID", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } } } } }, "/modify-task": { "post": { "description": "Modify task properties including description, project, priority, status, due date, and tags", "consumes": ["application/json"], "produces": ["application/json"], "tags": ["Tasks"], "summary": "Modify a task", "parameters": [ { "description": "Task modification details", "name": "task", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.ModifyTaskRequestBody" } } ], "responses": { "202": { "description": "Task modification accepted for processing", "schema": { "type": "string" } }, "400": { "description": "Bad request - invalid input or missing required fields", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } } } } }, "/tasks": { "get": { "description": "Fetch all tasks from Taskwarrior for a specific user", "consumes": ["application/json"], "produces": ["application/json"], "tags": ["Tasks"], "summary": "Get all tasks", "parameters": [ { "type": "string", "description": "User email", "name": "email", "in": "query", "required": true }, { "type": "string", "description": "Encryption secret for the user", "name": "encryptionSecret", "in": "query", "required": true }, { "type": "string", "description": "User UUID", "name": "UUID", "in": "query", "required": true } ], "responses": { "200": { "description": "List of tasks", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.Task" } } }, "400": { "description": "Missing required parameters", "schema": { "type": "string" } }, "500": { "description": "Failed to fetch tasks at backend", "schema": { "type": "string" } } } } } }, "definitions": { "models.AddTaskRequestBody": { "type": "object", "properties": { "UUID": { "type": "string" }, "description": { "type": "string" }, "due": { "type": "string" }, "email": { "type": "string" }, "encryptionSecret": { "type": "string" }, "priority": { "type": "string" }, "project": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } } } }, "models.Annotation": { "type": "object", "properties": { "description": { "type": "string" }, "entry": { "type": "string" } } }, "models.CompleteTaskRequestBody": { "type": "object", "properties": { "UUID": { "type": "string" }, "email": { "type": "string" }, "encryptionSecret": { "type": "string" }, "taskuuid": { "type": "string" } } }, "models.DeleteTaskRequestBody": { "type": "object", "properties": { "UUID": { "type": "string" }, "email": { "type": "string" }, "encryptionSecret": { "type": "string" }, "taskuuid": { "type": "string" } } }, "models.EditTaskRequestBody": { "type": "object", "properties": { "UUID": { "type": "string" }, "description": { "type": "string" }, "email": { "type": "string" }, "encryptionSecret": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "taskid": { "type": "string" } } }, "models.ModifyTaskRequestBody": { "type": "object", "properties": { "UUID": { "type": "string" }, "description": { "type": "string" }, "due": { "type": "string" }, "email": { "type": "string" }, "encryptionSecret": { "type": "string" }, "priority": { "type": "string" }, "project": { "type": "string" }, "status": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "taskid": { "type": "string" } } }, "models.Task": { "type": "object", "properties": { "annotations": { "type": "array", "items": { "$ref": "#/definitions/models.Annotation" } }, "depends": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" }, "due": { "type": "string" }, "end": { "type": "string" }, "entry": { "type": "string" }, "id": { "type": "integer" }, "modified": { "type": "string" }, "priority": { "type": "string" }, "project": { "type": "string" }, "recur": { "type": "string" }, "rtype": { "type": "string" }, "start": { "type": "string" }, "status": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "urgency": { "type": "number" }, "uuid": { "type": "string" }, "wait": { "type": "string" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } }, "tags": [ { "description": "Task management operations", "name": "Tasks" }, { "description": "Authentication and authorization endpoints", "name": "Auth" } ] }