<divclass="markdown-heading"><h1class="heading-element">Leaderboard API Endpoint</h1><aid="user-content-leaderboard-api-endpoint"class="anchor"aria-label="Permalink: Leaderboard API Endpoint"href="#leaderboard-api-endpoint"><spanaria-hidden="true"class="octicon octicon-link"></span></a></div>
</h2><aid="user-content-get-apileaderboard"class="anchor"aria-label="Permalink: GET /api/leaderboard"href="#get-apileaderboard"><spanaria-hidden="true"class="octicon octicon-link"></span></a></div>
<p>Returns the highest test data from each user as a JSON array. The data includes metrics such as username, words per minute (WPM), accuracy percentage, the time taken for the test, and the length of the test for a comprehensive overview of user performance.</p>
<code>200 OK</code>: Successfully retrieves the leaderboard data.</li>
<li>
<code>404 Not Found</code>: Indicates that the leaderboard was not found.</li>
<li>
<code>500 Internal Server Error</code>: Indicates an issue with accessing the database.</li>
</ul>
<divclass="markdown-heading"><h2class="heading-element">Example Response</h2><aid="user-content-example-response"class="anchor"aria-label="Permalink: Example Response"href="#example-response"><spanaria-hidden="true"class="octicon octicon-link"></span></a></div>