mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-19 12:50:11 -05:00
eb2f5c6afa
Desktop (Electron): - Add two-step first-run wizard: test TimeTracker via GET /api/v1/info, then log in with API token - Replace bogus token check with validateSession (users/me, fallback to timer/status for narrow scopes) - Normalize base URLs; classify TLS/DNS/timeout errors; periodic 401 forces re-login - Settings save/test use public + authenticated checks; prebuild/prestart and npm test Server: - Exempt /api/v1/info, /api/v1/health, and POST /api/v1/auth/login from HTML setup redirect - Include setup_required on GET /api/v1/info for unfinished installs Mobile (Flutter): - Validate saved token against new server URL before persisting settings change - Remove unused lib/core/config.dart; point BUILD_CONFIGURATION at app_config.dart Docs: DESKTOP_SETTINGS, desktop README, mobile-desktop-apps README, REST_API /info
API Documentation
Complete API reference for TimeTracker REST API.
📖 Overview
TimeTracker provides a comprehensive REST API for programmatic access to all features. The API supports token-based authentication and follows RESTful principles.
📚 Documentation
- REST API - Complete API reference with all endpoints
- Response Format - Standard error envelope and success/legacy response shapes
- API Token Scopes - Understanding token permissions and scopes
- API Versioning - API versioning strategy and best practices
- API Enhancements - Recent API improvements and additions
🔑 Quick Start
- Create an API token in Admin → Security & Access → Api-tokens (or
/admin/api-tokens) - Include the token in the
Authorizationheader:Bearer YOUR_TOKEN - Make requests to the API endpoints
- Review the API Token Scopes to ensure your token has the required permissions
📋 API Endpoints
See the REST API documentation for a complete list of available endpoints organized by resource type.