Use the docs pages
Find an endpoint, fill in its form, send it and read the answer, all in the browser.
1 Know the screen
Open Docs in the top bar and pick a group, for example Heroes. Every endpoint of that group is on the page, each with its own form.
On a phone or tablet the list on the left becomes a dropdown named Endpoint.
- Group tabs. Switch between Heroes, Academy, Esports, Player and Tools. The number is how many endpoints each group has.
- Filter. Type part of a name or path to shorten the list below. Press Esc to clear it.
- Endpoint list. Select a name to open that endpoint on its own page. GET reads data, POST sends data.
- Base URL switch. Choose the host your requests go to. Primary is selected unless you change it.
- Method and path. The address you would call from your own code.
- Search. Looks through every endpoint from any page. The / key and Ctrl K open it too.
2 Fill in the form
Open Hero counters. Each field is one parameter. The small text beside a label gives the parameter's real name and where it goes: in the path or in the query.
A red star marks a required field. The other fields already hold their default values.
- Hero identifier. A hero's number or name. miya, Miya and 1 are the same hero.
- Past days. How far back the statistics go.
- Rank. Which rank tier the statistics come from.
- Send request. Sends the real call to the API.
- Answer area. On a wide screen the answer appears here, beside the form. On a smaller screen it appears below.
3 Read the answer
The status line tells you whether it worked: 200 means success. Then pick how you want to look at the data.
- Status. The answer's code and how long it took.
- Table, JSON, Code. Three views of the same request.
- View switch. Changes the table between key and value rows and keys as column headings.
- The data. Nested objects become nested tables, and image addresses show a preview.
4 Copy the code
The Code tab writes the request you just sent in eight languages, with your values already filled in.
- Code tab. Opens the snippets.
- Language. curl, python, javascript, go, node, php, java or csharp.
- Copy Snippet. Puts the code on your clipboard.
- Snippet. Paste it into your project and run it.
5 Jump anywhere with search
Press / on any page and type what you are looking for. Use the up and down arrows, then Enter.
- Search field. Type words from a name or a path, such as counters or ph standings.
- Highlighted result. Enter opens this one.
- Group. Which part of the API the result belongs to.