Demo API documentation and endpoints
This API documentation demonstrates REST endpoint design and backend architecture. The endpoints are functional within this demo environment.
Demo environment uses session-based authentication with NextAuth.js integration.
All API endpoints are relative to the current domain's /api path.
All responses return JSON with consistent error handling and status codes.
/api/tracks
Retrieve all tracks with pagination
GET /api/tracks?page=1&limit=10
/api/tracks/{id}
Get specific track by ID
GET /api/tracks/clx123abc
/api/artists
List all artists with optional genre filter
GET /api/artists?genre=synthwave
/api/albums
Retrieve albums with track information
GET /api/albums
{ "tracks": [ { "id": "clx123abc", "title": "Neon Dreams", "description": "A synthwave journey...", "audioUrl": "https://example.com/track.mp3", "artworkUrl": "https://example.com/artwork.jpg", "duration": 180, "tempo": 128, "mood": "Energetic", "artist": { "id": "cly456def", "name": "Demo Artist" }, "album": { "id": "clz789ghi", "title": "Digital Horizons" } } ], "pagination": { "page": 1, "limit": 10, "total": 50 } }
Test the endpoints and see the backend architecture in action.