User Endpoints
Every battle one player has played, tournament and casual alike.
Battles a player has taken part in, newest first. The date range is optional. Archived battles are left out.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
publicId | string | Required | The public player id. It comes back as playerId on leaderboard rows, battle players and army lists. |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string | Optional | Only battles played on or after this date. Leave out for no lower bound. |
to | string | Optional | Only battles played on or before this date. Leave out for no upper bound. Give both and the window may not be longer than a year. |
cursor | string | Optional | Comes from the "next" link of a previous response. |
limit | integer | Optional | Results per page. Default: 20, max: 100. |
Response Fields (per battle)
idstring- The battle id. Pass it to /battles/{id}.
datestring (YYYY-MM-DD) | null- The day the battle was played, as a local date.
tournamentstring | null- Slug of the tournament the battle belongs to. Null for a casual battle.See Tournament
stagestring | null- Id of the tournament stage the battle was played in, for example "swiss". Null for a casual battle.See Stage
roundnumber | null- Round number, counting from 1.
scenariostring | null- Scenario played.
battlePackstring | null- Name of the battle pack the battle was played with.
battleSizenumber- Points limit per army, for example 2000.
winnerstring | null- Name of the winning player. Null on a draw and on a battle with no result yet.
victorySize"major" | "minor" | null- How big the win was.
playersBattlePlayer[]- The two players and how they scored.
urlstring- Link to the battle page on milarki.com.
Returns 404 if the player does not exist.
Example request
bash
curl "https://milarki.com/api/v1/users/L80MTI4R/battles?from=2025-01-01&to=2025-12-31" \
-H "Authorization: Bearer mlk_v1_yourkey"Example response
json
{
"data": [
{
"id": "000b1161c8a864a1f75f",
"date": "2025-01-14",
"tournament": "the-behemoth",
"stage": "knockout",
"round": 6,
"scenario": "Lines of Communication",
"battlePack": "GHB 24/25 4th",
"battleSize": 2000,
"winner": "Anders Larsson",
"victorySize": "major",
"players": [
{
"player": "Anders Larsson",
"playerId": "L80MTI4R",
"faction": "Disciples of Tzeentch",
"subFaction": "Guild of Summoners",
"outcome": "win",
"battlePoints": 20,
"victoryPoints": 28,
"objectivePoints": 18,
"battleTacticsScored": 3,
"drops": 6,
"role": "attacker",
"metrics": {}
}
],
"url": "https://www.milarki.com/battles/000b1161c8a864a1f75f"
}
],
"next": "https://milarki.com/api/v1/users/L80MTI4R/battles?cursor=eyJpZCI6Im5leHQifQ&limit=20"
}