API Endpoints Reference
OpenAPI spec definerer 52 operationIds totalt. Heraf er 44 eksponeret via iOS APIClient.
Quick Filter
Brug søgefunktionen (⌘K / Ctrl+K) til at finde specifikke endpoints.
Summary
| Kategori | Exposed | Not Exposed | Total |
|---|---|---|---|
| User & Auth | 12 | 2 (userLogout, resendVerification) | 14 |
| Tasks | 13 | 1 (getTask - listTasks bruges i stedet) | 14 |
| Questions & Community | 12 | 0 | 12 |
| Brain Dump | 1 | 0 | 1 |
| Daily Content | 2 | 0 | 2 |
| Courses | 4 | 0 | 4 |
| Internal/Webhooks | 0 | 5 (webhooks, health, debug) | 5 |
| Total | 44 | 8 | 52 |
User & Auth (12 exposed / 14 total)
Ikke eksponerede (2)
userLogout- Ikke eksponeret (logout håndteres client-side via SessionClient)resendVerification- Ikke eksponeret
| Endpoint | OperationId | Beskrivelse | Mapping |
|---|---|---|---|
POST /v1/users/register | registerUser | Opret ny bruger | DTO → User |
POST /v1/users/login | userLogin | Login med email/password | DTO → AuthToken |
POST /v1/users/verify | verifyUser | Verificer email token | - |
POST /v1/users/reset-password | sendResetPasswordRequest | Send reset password email | - |
POST /v1/users/verify-reset | verifyEmailToResetPassword | Verificer reset token | - |
POST /v1/users/set-password | setNewPassword | Sæt nyt password | - |
POST /v1/users/send-verification | sendUserVerification | Gensend verification email | - |
GET /v1/users/me | getMe | Hent current user | DTO → User |
DELETE /v1/users/me | deleteUser | Slet bruger permanent | - |
GET /v1/users/me/settings | getUserSettings | Hent user settings | DTO → UserSettings |
PUT /v1/users/me/settings | updateUserSettings | Opdater settings | DTO → UserSettings |
POST /v1/users/upload-photo | setUserProfilePhoto | Upload profilbillede | Multipart form |
Tasks (13 exposed / 14 total)
Ikke eksponeret (1)
getTask- Ikke eksponeret (listTasksbruges i stedet for at hente enkelt task)
| Endpoint | OperationId | Beskrivelse | Mapping |
|---|---|---|---|
POST /v1/tasks | createTask | Opret ny task | DTO → AppTask |
GET /v1/tasks | listTasks | Hent alle tasks | DTOs → [AppTask] |
DELETE /v1/tasks/{id} | deleteTask | Slet task | - |
PUT /v1/tasks/{id} | updateTask | Opdater task | DTO → AppTask |
PUT /v1/tasks/{id}/subtasks | updateTaskSubtasks | Opdater subtasks | DTOs → [Subtask] |
PUT /v1/tasks/{id}/completion | updateTaskCompletion | Marker completed | DTO → AppTask |
PUT /v1/tasks/{id}/subtasks/{subtask_id} | updateTaskSubtask | Opdater enkelt subtask | DTO → Subtask |
POST /v1/recurring-tasks | createRecurringTask | Opret recurring task | DTO → RecurringTask |
PUT /v1/recurring-tasks/{id} | updateRecurringTask | Opdater recurring task | DTO → RecurringTask |
DELETE /v1/recurring-tasks/{id} | deleteRecurringTask | Slet recurring task | - |
POST /v1/tasks/generate | generateTaskWithAI | AI task generation | DTO → AppTask |
POST /v1/tasks/generate-icon | generateTaskIcon | Generér task ikon | String → IconName |
POST /v1/tasks/estimate-time | estimateTimeForTask | Estimér task duration | DTO → TimeEstimate |
Questions & Community (12 endpoints)
| Endpoint | OperationId | Beskrivelse | Mapping |
|---|---|---|---|
GET /v1/questions | listQuestions | Hent alle spørgsmål | DTOs → [QuestionOfTheDay] |
POST /v1/questions/{id}/answers | createQuestionAnswer | Besvar spørgsmål | DTO → QuestionAnswer |
GET /v1/questions/{id}/answers | listQuestionAnswers | Hent svar på spørgsmål | DTOs → [QuestionAnswer] |
POST /v1/questions/answers/{id}/photo | attachQuestionAnswerPhoto | Upload billede til svar | Multipart form |
POST /v1/questions/answers/{id}/like | likeQuestionAnswer | Like et svar | - |
DELETE /v1/questions/answers/{id}/like | unlikeQuestionAnswer | Unlike et svar | - |
POST /v1/questions/answers/{id}/report | reportQuestionAnswer | Rapportér svar | - |
POST /v1/questions/answers/{id}/comments | createQuestionAnswerComment | Kommentér på svar | DTO → Comment |
GET /v1/questions/answers/{id}/comments | listQuestionAnswerComments | Hent kommentarer | DTOs → [Comment] |
POST /v1/questions/answers/comments/{id}/like | likeQuestionAnswerComment | Like kommentar | - |
DELETE /v1/questions/answers/comments/{id}/like | unlikeQuestionAnswerComment | Unlike kommentar | - |
POST /v1/questions/answers/comments/{id}/report | reportQuestionAnswerComment | Rapportér kommentar | - |
Brain Dump (1 endpoint)
| Endpoint | OperationId | Beskrivelse | Mapping |
|---|---|---|---|
POST /v1/brain-dump/process | processBrainDump | Process voice transcript → suggested tasks | DTO → [SuggestedTask] |
Daily Content (2 endpoints)
| Endpoint | OperationId | Beskrivelse | Mapping |
|---|---|---|---|
GET /v1/daily/inspiration | getDailyInspiration | Dagens inspiration | DTO → DailyInspiration |
GET /v1/daily/plan | getDailyPlan | Dagens plan | DTO → DailyPlan |
Courses (4 endpoints)
| Endpoint | OperationId | Beskrivelse | Mapping |
|---|---|---|---|
GET /v1/courses | listCourses | Hent alle kurser | DTOs → [Course] |
GET /v1/courses/{id} | getCourse | Hent enkelt kursus | DTO → Course |
GET /v1/courses/onboarding | listOnboardingCourses | Hent onboarding kurser | DTOs → [Course] |
PUT /v1/courses/content/{id}/completion | updateCourseContentCompletion | Marker content completed | - |
Implementation Details
Mapping Layer
Alle endpoints mapper mellem OpenAPI-genererede DTOs og domain models:
OpenAPI DTO (Components.Schemas.*)
↓
Mapping function (APIClient+Live.swift)
↓
Domain Model (SharedModels)Eksempel:
// OpenAPI DTO
let dto: Components.Schemas.UserResponse
// Mapper til domain model
let user = User(
id: User.ID(dto.id),
email: dto.email,
displayName: dto.display_name
)Multipart Endpoints
To endpoints bruger multipart/form-data:
setUserProfilePhoto- Upload profilbilledeattachQuestionAnswerPhoto- Upload billede til question answer
Disse kræver explicit Components.Schemas.Body_* type annotations fra OpenAPI spec.
Special Patterns
Chained calls:
generateTaskWithAI→ kan kaldegenerateTaskIconautomatiskgetCourse→ henter kursus + progress
Operations. type refs:* Nogle endpoints bruger Operations.operationId.* typer direkte i stedet for Components.Schemas.*:
listTaskscreateQuestionAnswerCommentlistQuestionAnswerCommentslistQuestionAnswers
Kildekode
Se Sources/APIClientLive/ for mapping-implementationer.
Fuld OpenAPI spec: openapi.yaml (3350 lines)
Internal/Webhooks (0 exposed / 5 total)
Disse endpoints er ikke eksponeret via APIClient - de er kun tilgængelige for backend webhooks og debug.
| Endpoint | OperationId | Formål |
|---|---|---|
POST /contentful/* | upsertContentfulQuestion | Contentful CMS webhook |
DELETE /contentful/* | deleteContentfulQuestion | Contentful CMS webhook |
POST /revenuecat/* | handleRevenueCatWebhook | RevenueCat subscription webhook |
GET /health | healthCheck | Server health check |
GET /sentry-debug | triggerSentryDebug | Debug endpoint til Sentry test |
Hvorfor ikke eksponeret?
- Webhooks kaldes af eksterne services (Contentful, RevenueCat) - ikke iOS app
- Health/debug er operations endpoints, ikke feature funktionalitet
Intern dokumentation
Denne side er baseret på operationid-inventory.md.