API Endpoint Documentation
This page lists all available endpoints in the Ticket Printer service, with usage instructions and authentication requirements.
API Endpoints (Blueprint: api)
| Path | Method | Description | Auth | Example |
| /api/v1/print-queue |
GET |
Get pending print jobs for Raspberry Pi to poll |
API Key |
curl -H "Authorization: Bearer <api_key>" http://localhost:5000/api/v1/print-queue |
Auth Endpoints (Blueprint: auth)
| Path | Method | Description | Auth | Example |
| /auth/login |
GET, POST |
API Key login page |
None (login), API Key (session) |
curl -X POST -d "api_key=..." http://localhost:5000/auth/login |
| /auth/logout |
GET |
Logout and clear session |
Session |
curl http://localhost:5000/auth/logout |
Items Endpoints (Blueprint: items)
| Path | Method | Description | Auth | Example |
| /groups/<group_id>/lists/<list_id>/items/ |
GET, POST |
List all items in a list or add a new item |
Session |
curl http://localhost:5000/groups/1/lists/1/items/ |
Lists Endpoints (Blueprint: lists)
| Path | Method | Description | Auth | Example |
| /groups/<group_id>/lists/ |
GET |
List all lists for a group |
Session |
curl http://localhost:5000/groups/1/lists/ |
| /groups/<group_id>/lists/create |
GET, POST |
Create a new list |
Session |
curl -X POST -d "name=..." http://localhost:5000/groups/1/lists/create |
Groups Endpoints (Blueprint: groups)
| Path | Method | Description | Auth | Example |
| /groups/ |
GET |
List all groups for the current user |
Session |
curl http://localhost:5000/groups/ |
| /groups/create |
GET, POST |
Create a new group |
Session |
curl -X POST -d "name=..." http://localhost:5000/groups/create |
History Endpoints (Blueprint: history)
| Path | Method | Description | Auth | Example |
| /history/ |
GET |
Show overall activity history |
Session |
curl http://localhost:5000/history/ |
| /history/groups/<group_id> |
GET |
Show history for a specific group |
Session |
curl http://localhost:5000/history/groups/1 |
| /history/lists/<list_id> |
GET |
Show detailed history for a specific list |
Session |
curl http://localhost:5000/history/lists/1 |
Printer Endpoints (Blueprint: printer)
| Path | Method | Description | Auth | Example |
| /printer/ |
GET |
Show printer status and recent print jobs |
Session |
curl http://localhost:5000/printer/ |
| /printer/status |
GET |
Get current printer status |
Session |
curl http://localhost:5000/printer/status |
| /printer/groups/<group_id>/lists/<list_id>/print |
POST |
Print a grocery list |
Session |
curl -X POST http://localhost:5000/printer/groups/1/lists/1/print |
Users Endpoints (Blueprint: users)
| Path | Method | Description | Auth | Example |
| /users/ |
GET |
List all users |
Admin/Session |
curl http://localhost:5000/users/ |
| /users/create |
GET, POST |
Create a new user |
Admin/Session |
curl -X POST -d "username=...&email=..." http://localhost:5000/users/create |
Note: Some endpoints require an API key or session authentication. Replace <api_key>, <group_id>, <list_id>, etc. with actual values.