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

480 B

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

curl -X GET "https://example.com/api/leaderboard"

Response

[
	{
	    "userName": "user_1",
	    "wpm": 85,
	},
	{
	    "userName": "user_2",
	    "score": 80,
	},
	{
	    "userName": "user_3",
	    "wpm": 73,
	}
]