API Update - Patch 3.8

General Discussion
Overview

In Patch 3.7, we introduced the Leagues and Seasons API endpoints. This helped many community members correlate leagues to ladders. It alleviated the issue of hunting down ladder Ids. We were not satisfied stopping there and proceeded to expose more data. We are proud to announce a new Ladder endpoint via the Game Data APIs. Be sure to register for a Battle.net API Account before exploring the new endpoint.

Ladder
https://us.api.battle.net/data/sc2/ladder/:ID

We tried to port as much data from the old API to this new endpoint. We've also made some quality of life improvements.


{
"league" : {
"league_key" : {
"league_id" : 6,
"season_id" : 1,
"queue_id" : 201,
"team_type" : 0
},
"key" : {
"href" : "https://us.api.battle.net/data/sc2/league/1/201/0/6"
}
},
"team" : [{
"id" : 1011621066298097700,
"rating" : 5070,
"points" : 390,
"wins" : 194,
"losses" : 127,
"ties" : 0,
"longest_win_streak" : 18,
"current_win_streak" : 18,
"current_rank" : 1,
"highest_rank" : 200,
"previous_rank" : 0,
"join_time_stamp" : 1475810077,
"last_played_time_stamp" : 1475810077,
"member" : [{
"legacy_link" : {
"id" : 7331,
"realm" : 1,
"name" : "ThePontiff#123",
"path" : "/profile/7331/1/ThePontiff"
},
"played_race_count" : [{
"race" : {
"en_US" : "Random"
},
"count" : 321
}
],
"character_link" : {
"id" : 7331,
"battle_tag" : "ThePontiff#4567",
"key" : {
"href" : "https://us.api.battle.net/data/sc2/character/ThePontiff-4567/7331"
}
},
"clan_link" : {
"id" : 222999,
"clan_tag" : "PxMs",
"clan_name" : "Pontifex Maximus",
"icon_url" : "http://US.depot.battle.net:1119/19fc0945ec1a2ccf6b71154a943ad747d019cf76a7ebb87cabef7cc370f6dd31.clfl",
"decal_url" : "http://US.depot.battle.net:1119/20a6545e80734bb4bc874ed4c2ec54150c7278d61851264609a2edf6211d0740.clfl"
}
}
]
}
]
}

Additions

MMR
This was by far the most requested feature. You can now see a team's rating.

League
The document contains a link to the parent league of this ladder. Now an arbitrary ladder Id can be traced back to a league. The league key notably lacks division and tier Ids. We may add those values in a later release.

Ties and Win Streaks
Extra stats that we thought were interesting. We hope you also find them interesting.

Current Rank
Having highest and previous rank without a current rank seemed strange. We like to see where we stand.

Team Id
This is a unique identifier for a given team. It should be possible to track a solo player between 1v1, 2v2, 3v3, and 4v4. Consequently, it should be possible to track a two player team between 2v2, 3v3, and 4v4. Some interesting data might come from cross analysis.

BattleTag
Other Blizzard games identify players by BattleTag. This is reflected in their APIs and websites. We felt it was time to catch up. We also have tentative plans to move the profile API to this new format. You can see hints of it in the character_link object.

Clan Details
We added URLs to the clan decal and icon (if they exist). We also added the clan Id for tracking.
Last played time stamp
UTC time stamp of the last game played for the given ladder team. With race specific MMR, this will be different for each player's race!

Changes

Played race counts
The old API had fields favoriteRaceP1 through favoriteRaceP4. We converted those into a played_race_count object for each team member. For 1v1, this will only ever contain one race because of race based MMR. Teams with multiple members may contain multiple played races because race based MMR is not applied to those modes.

Previous Seasons
This new endpoint will work for the current season and beyond. We don't currently have plans to load and convert previous seasons. We are prioritizing functionality at the moment.

Feedback
We are excited to see what you, the community, can make with these new APIs. Be sure to visit the API Forum to ask questions and make suggestions.
So the reason for the old endpoints having error 500 is because you're deprecating them?
"Other Blizzard games identify players by BattleTag. This is reflected in their APIs and websites. We felt it was time to catch up. We also have tentative plans to move the profile API to this new format. You can see hints of it in the character_link object."

Does this mean I'll go from StoleYourCat to my battle tag in game?
finally, MMR is here
11/21/2016 05:42 PMPosted by hucancode
finally, MMR is here
MMR has always been here, lol.

Join the Conversation

Return to Forum