CS-Coursework/documentation/leaderboard.md
2024-03-20 17:42:11 +00:00

36 lines
480 B
Markdown

This API endpoint retrieves the highest test data from each user and returns it as a JSON array.
# Endpoint
```
GET /api/leaderboard
```
# Request Parameters
This endpoint does not require any request parameters.
# Example Request
```bash
curl -X GET "https://example.com/api/leaderboard"
```
# Response
```json
[
{
"userName": "user_1",
"wpm": 85,
},
{
"userName": "user_2",
"score": 80,
},
{
"userName": "user_3",
"wpm": 73,
}
]
```