1.9 KiB
1.9 KiB
title, name, description
| title | name | description |
|---|---|---|
| Vikunja API Integration | vikunja-api-integration | Automate interaction with local Vikunja instance for project and task management. |
Vikunja API Integration
Current Status
- ❌ Authentication Required: All API calls return 401 Unauthorized
- ⚠️ Missing Token: Need valid JWT Bearer Token to access data
- ✅ System Healthy: Vikunja container running on localhost:3456
Purpose
Automate interaction with local Vikunja instance for project and task management.
Prerequisites
- Vikunja Docker container running on localhost:3456
- Valid JWT Bearer Token for authentication
Key Endpoints
- GET /api/v1/projects - List all projects
- GET /api/v1/projects/{id} - Get specific project details
- GET /api/v1/projects/{id}/tasks - List tasks for project
- POST /api/v1/tasks/{id} - Update task status
Authentication
curl -H "Authorization: Bearer <TOKEN>" \
"http://localhost:3456/api/v1/projects"
Common Issues
- 401 Unauthorized: Invalid/missing token
- 429 Too Many Requests: Rate limiting
Workflow
- Get project list to find project ID by title
- Query tasks for specific project ID
- Filter tasks by completion status
Example Commands
# Get projects
curl -s -H "Authorization: Bearer <TOKEN>" \
"http://localhost:3456/api/v1/projects" | python3 -m json.tool
# Get tasks for project ID 5
curl -s -H "Authorization: Bearer <TOKEN>" \
"http://localhost:3456/api/v1/projects/5/tasks" | python3 -m json.tool
# Filter incomplete tasks
curl -s -H "Authorization: Bearer <TOKEN>" \
"http://localhost:3456/api/v1/projects/5/tasks" | \
python3 -c "
import sys, json
data = json.load(sys.stdin)
incomplete = [t for t in data if not t['done']]
if incomplete:
for t in incomplete:
print(f'ID: {t[\"id\"]} | 标题: {t[\"title\"]}')
else:
print('当前无未完成任务')
"