Endpoints
GET /api/users
List all user profiles.
Response 200: Record<string, UserProfile>
GET /api/users/batch?ids=...
Get multiple profiles by comma-separated IDs.
Response 200: Record<string, UserProfile>
Errors: 400 if ids parameter is missing.
GET /api/users/:userId
Get a single user profile.
Response 200: UserProfile
Errors: 404 if not found.
GET /api/users/:userId/challenges
Get a user’s challenge history (ended games only).
Query: limit (default 50), offset
Response 200:
GET /api/users/:userId/scores
Get scoring data for a specific user.
Response 200: User’s scoring data.
Errors: 404 if scoring not configured or user not found.
POST /api/users
Update a user profile. Uses merge semantics — omitted fields keep previous values.
Body:
200: Updated UserProfile.
Errors: 400 (validation error or missing userId).
Related
- Data Types —
UserProfiletype definition