Use Swagger UI
Try any endpoint in Swagger UI, read its answer and authorize with your sign-in token.
1 Open Swagger UI
Select Swagger UI in the docs tabs, or open /api/docs. It lists the same endpoints as the docs pages, in the standard OpenAPI layout that many developers already know.
- Name and version. The API's name and the release you are reading.
- Authorize. Where you paste your sign-in token. Only the player endpoints need it.
- Group. Endpoints are grouped. Select a group name to fold or unfold it.
- Endpoint row. Method, path and name. Select the row to open it.
2 Try it out
Open GET /api/heroes/{hero_identifier}/counters and select Try it out. The fields become editable.
- Hero identifier. Type a hero name or number, for example miya.
- Rank. Pick the rank tier, for example mythic.
- Execute. Sends the request.
3 Read the response
Scroll down to Server response. Swagger UI shows the exact request it sent as well as the answer.
- Curl. The same request as a command you can paste into a terminal.
- Request URL. The full address, with your values in it.
- Code. 200 means success.
- Response body. The JSON answer. The icons in its corner copy or download it.
The Responses list further down shows example answers, not your live answer. Your answer is under Server response.
4 Authorize for player endpoints
Player endpoints answer only for the signed-in player. Sign in on the website (see the sign-in guide), open your name in the top bar and select Copy JWT. Then select Authorize in Swagger UI and paste it.
- Value. Paste the token here, without the word Bearer.
- Authorize. Keeps the token for every request you send from this page.
A token gives access to your player data. Do not share it or post a screenshot of it. It expires after about a day.