Base URL
All metadata endpoints are prefixed with/api/game/metadata/
.
Authentication
All metadata endpoints require a valid JWT token in the Authorization header:Get Player Metadata
Retrieve the current player’s metadata. Endpoint:GET /api/game/metadata
Headers:
Get Metadata by Sequential ID
Retrieve metadata for a specific player using their sequential ID. Endpoint:GET /api/game/metadata/{sequentialId}
Headers:
Set Player Metadata
Store or update the current player’s metadata. Endpoint:POST /api/game/metadata
Headers:
Delete Player Metadata
Remove all metadata for the current player. Endpoint:DELETE /api/game/metadata
Headers:
Metadata Structure
The metadata can contain any JSON-serializable data. Common use cases include:- Game Progress: Level, experience points, achievements
- Player Settings: Audio settings, graphics preferences, controls
- Game State: Current position, inventory, unlocked content
- Statistics: Play time, high scores, completion rates
Error Responses
Unauthorized
Player Not Found
Invalid Data
Best Practices
- Data Structure: Use consistent data structures for better organization
- Size Limits: Keep metadata reasonably sized (under 1MB)
- Privacy: Don’t store sensitive personal information
- Backup: Consider backing up important metadata locally
- Validation: Validate metadata structure before sending