Logo

Cake Planner

Backend

API Documentation

API Documentation for the Cake Planner Backend, separated into Admin API and User API.


Table of Contents


Admin API

These endpoints require administrator privileges (is_admin flag) or specific group administration rights.

MethodEndpointDescription
GET/api/admin/usersList all users (Admin) or group members (Group Admin).
PUT/api/admin/users/<id>/statusActivate or deactivate a user account (Admin only).
DELETE/api/admin/users/<id>Delete a user account (Admin only).
GET/api/admin/groupsList all groups (Admin) or owned group (Group Admin).
POST/api/admin/groupsCreate a new group (Admin only).
DELETE/api/admin/groups/<id>Delete a group (Admin only).
POST/api/admin/users/assign-groupAssign a user to a group (Admin only).
POST/api/admin/groups/set-roleSet a user's role within a group (Admin only).
POST/api/admin/users/force-password-changeForce a user to change their password on next login.

User API

Endpoints available to standard users. Some endpoints (login, register) are public.

MethodEndpointDescription
POST/api/auth/registerRegister a new user account.
POST/api/auth/loginAuthenticate and receive a JWT token.
POST/api/auth/2fa/setupInitiate 2FA setup (returns secret and QR code URL).
POST/api/auth/2fa/activateActivate 2FA by verifying the code.
POST/api/auth/forgot-passwordRequest a temporary password (sent via email).
GET/api/usersList accessible users (e.g., group members).
GET/api/user/groupsList groups the user is a member of.
POST/api/user/change-passwordChange the current user's password.
POST/api/user/settingsUpdate user settings (e.g., language).
DELETE/api/userDelete own user account.
GET/api/eventsList events within a date range (params: start, end).
POST/api/eventsCreate a new event.
GET/api/events/<id>Get details of a specific event.
DELETE/api/events/<id>Delete an event (creator or admin).
GET/api/events/streamServer-Sent Events (SSE) stream for real-time updates.
GET/api/events/rankedGet "Hall of Fame" (ranked events).
POST/api/events/<id>/rateRate an event.
GET/api/events/<id>/icsDownload event as ICS calendar file.
POST/api/events/<id>/photoUpload a photo to an existing event.
GET/api/system/sysinfoRetrieve system and build information.
GET/api/system/healthcheckCheck system health status.