Fitness Tracker API is a REST API that enables uploading and downloading fitness tracker data. Developers can register on the platform, register their applications and receive unique API keys for authentication. The API implements different rate limit policies for basic and premium application categories.
This project was mainly built with Spring Boot, Spring Data JPA and Spring Security, and uses custom API-Key authentication to protect endpoints.
- Upload and download fitness activity data
- Developer and application registration
- Custom API-Key authentication
- Request rate limiting (1 request/second for basic apps)
- Application categories (basic and premium) with different service levels
- Data storage in a relational database (e.g. H2)
curl -X POST http://localhost:8080/api/developers/signup \
-H "Content-Type: application/json" \
-d '{
"email": "developer@example.com",
"password": "securePassword123"
}'
curl -X GET http://localhost:8080/api/developers/{id} \
-u developer@example.com:securePassword123
curl -X POST http://localhost:8080/api/applications/register \
-H "Content-Type: application/json" \
-u developer@example.com:securePassword123 \
-d '{
"name": "MyFitnessApp",
"description": "Tracks user fitness activities",
"category": "premium"
}'
curl -X POST http://localhost:8080/api/tracker \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key-here" \
-d '{
"username": "user123",
"activity": "running",
"duration": 1800,
"calories": 450
}'
curl -X GET http://localhost:8080/api/tracker \
-H "X-API-Key: your-api-key-here"