openapi: 3.1.0 info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 0.1.0 description: Worklog → Impact Portfolio API servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: entries description: Log entry operations - name: summaries description: Aggregated summary operations - name: stats description: Dashboard statistics paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check description: Returns server health status responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /entries: get: operationId: listEntries tags: [entries] summary: List log entries parameters: - name: project in: query schema: type: string - name: keyword in: query schema: type: string - name: startDate in: query schema: type: string - name: endDate in: query schema: type: string - name: limit in: query schema: type: integer - name: offset in: query schema: type: integer responses: "200": description: List of entries content: application/json: schema: type: array items: $ref: "#/components/schemas/LogEntry" post: operationId: createEntry tags: [entries] summary: Create a log entry requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LogEntryInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/LogEntry" /entries/{id}: get: operationId: getEntry tags: [entries] summary: Get a single log entry parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Entry found content: application/json: schema: $ref: "#/components/schemas/LogEntry" "404": description: Not found patch: operationId: updateEntry tags: [entries] summary: Update a log entry parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LogEntryUpdate" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/LogEntry" "404": description: Not found delete: operationId: deleteEntry tags: [entries] summary: Delete a log entry parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted "404": description: Not found /summaries/weekly: get: operationId: getWeeklySummary tags: [summaries] summary: Get weekly summary grouped by project parameters: - name: startDate in: query schema: type: string description: Start of week (ISO date, defaults to 7 days ago) - name: endDate in: query schema: type: string description: End of week (ISO date, defaults to today) responses: "200": description: Weekly summary content: application/json: schema: $ref: "#/components/schemas/WeeklySummary" /summaries/monthly: get: operationId: getMonthlySummary tags: [summaries] summary: Get monthly summary grouped by project parameters: - name: year in: query schema: type: integer description: Year (defaults to current year) - name: month in: query schema: type: integer description: Month 1-12 (defaults to current month) responses: "200": description: Monthly summary content: application/json: schema: $ref: "#/components/schemas/MonthlySummary" /stats/dashboard: get: operationId: getDashboardStats tags: [stats] summary: Dashboard statistics overview responses: "200": description: Dashboard stats content: application/json: schema: $ref: "#/components/schemas/DashboardStats" /stats/projects: get: operationId: getProjectStats tags: [stats] summary: Entry counts and impact scores per project responses: "200": description: Project breakdown content: application/json: schema: type: array items: $ref: "#/components/schemas/ProjectStat" /portfolio: get: operationId: getPortfolioEntries tags: [summaries] summary: Get entries formatted as resume bullets parameters: - name: project in: query schema: type: string - name: startDate in: query schema: type: string - name: endDate in: query schema: type: string responses: "200": description: Portfolio bullets content: application/json: schema: type: array items: $ref: "#/components/schemas/PortfolioBullet" /export/markdown: get: operationId: exportMarkdown tags: [summaries] summary: Export entries as Markdown text parameters: - name: mode in: query schema: type: string enum: [weekly, monthly, portfolio, all] - name: startDate in: query schema: type: string - name: endDate in: query schema: type: string - name: year in: query schema: type: integer - name: month in: query schema: type: integer responses: "200": description: Markdown content content: application/json: schema: $ref: "#/components/schemas/ExportResult" components: schemas: HealthStatus: type: object properties: status: type: string required: - status LogEntry: type: object required: [id, date, project, workDone, impact, createdAt, updatedAt] properties: id: type: integer date: type: string description: ISO date string (YYYY-MM-DD) project: type: string workDone: type: string impact: type: string link: type: ["string", "null"] createdAt: type: string updatedAt: type: string LogEntryInput: type: object required: [date, project, workDone, impact] properties: date: type: string project: type: string minLength: 1 workDone: type: string minLength: 1 impact: type: string minLength: 1 link: type: string LogEntryUpdate: type: object properties: date: type: string project: type: string workDone: type: string impact: type: string link: type: ["string", "null"] WeeklySummary: type: object required: [startDate, endDate, totalEntries, projects] properties: startDate: type: string endDate: type: string totalEntries: type: integer projects: type: array items: $ref: "#/components/schemas/ProjectGroup" MonthlySummary: type: object required: [year, month, totalEntries, projects] properties: year: type: integer month: type: integer totalEntries: type: integer projects: type: array items: $ref: "#/components/schemas/ProjectGroup" ProjectGroup: type: object required: [project, entries, entryCount] properties: project: type: string entryCount: type: integer entries: type: array items: $ref: "#/components/schemas/LogEntry" DashboardStats: type: object required: [totalEntries, thisWeekEntries, thisMonthEntries, totalProjects, streakDays, recentEntries] properties: totalEntries: type: integer thisWeekEntries: type: integer thisMonthEntries: type: integer totalProjects: type: integer streakDays: type: integer recentEntries: type: array items: $ref: "#/components/schemas/LogEntry" ProjectStat: type: object required: [project, entryCount, lastEntryDate] properties: project: type: string entryCount: type: integer lastEntryDate: type: string PortfolioBullet: type: object required: [project, bullet, date] properties: project: type: string bullet: type: string date: type: string link: type: ["string", "null"] ExportResult: type: object required: [content, filename] properties: content: type: string filename: type: string