Diablo® III

Maintenance mode and Cache-only mode

Web & Mobile Team
Since there are a few issues in KR/TW that are currently being looked at, this is good time let everyone know about two features: maintenance mode and cache-only mode.

We have the ability to put the API into a state where it can reject requests outright because of service maintenance or fill them only if the requested data is cached. This gives us a lot of flexibility behind the scenes to update the system and reduce service disruption.

When either of these modes are enabled, you'll get one of the following responses:

{
"code": "MAINTENANCE",
"reason": "The application is in maintenance."
}


{
"code": "LIMITED",
"reason": "The application is in limited mode."
}


When you receive one of these, we recomend that you apply some sort of back-off logic to reduce load the system. These modes are not enabled automatically (for now, maybe), so when they are enabled, it means we have explicitly decided to do so.
Reply Quote
1 Undead Mage
0
Does the "code" key replaces the "status" key for every failed Diabki/World of Warcraft API request?

And I have to thank you, this allows way better tracking/handling of errors.

Edit: What is the HTTP status codes that will be returned?
Edited by coss#2789 on 8/12/2012 6:29 AM PDT
Reply Quote
Web & Mobile Team
Does the "code" key replaces the "status" key for every failed Diabki/World of Warcraft API request?

And I have to thank you, this allows way better tracking/handling of errors.

Edit: What is the HTTP status codes that will be returned?


At this time, I believe a 200 is returned. For maintenance we should and will return a 503. For cache-only we should and will return a 404.
Reply Quote
Web & Mobile Team
I suppose that I can take this time to explain some of the inner workings of the caching system and how it relates to the API.

The elements that compose a career profile include: account information (fallen heroes, artisan info, etc), account details (kills and account stats, etc), play time stats, hero list, hero information (name, class, level, equipped items, quests, etc), hero details (kills, etc) and item details. We also have a bunch of translation tuples for things like translating your battletag to a game account id.

Very frequently, we get game session events from the game team and we use those events to expire a really big cache (with many gigs of memory). When we expire cached data, we remove all of if from the cache and then explicitly re-fetch it all from our data source and put it back into the cache. This system works pretty well and allows us to proactively have data available by the time you end your game session and visit the D3 game site or a fansite.
Edited by Straton on 8/12/2012 9:53 AM PDT
Reply Quote
1 Undead Mage
0
08/12/2012 09:40 AMPosted by Straton
At this time, I believe a 200 is returned. For maintenance we should and will return a 503. For cache-only we should and will return a 404.

Thank you for the clarification. I guess the "code" key is only returned in these two cases, but do you plan to categorize every error response in the future?

I'm currently unable to force an internal server error of all kinds. so I cannot check whether the returned error response works as intended or if it is broken like the 404 response (returns a tomcat apache error page instead of an expected json result -- but you surely know about that :))
Reply Quote
I would love unique error codes like these. It would certainly be much more useful than 'NOK' and less of a hassle than going through error messages.

As for the 503 response, can we get a 'Retry-After' header so we have an ideal time to come back from a "back-off" period? Otherwise there's no way to know if it is a 15 minute restart or 8 hour patch, so we would have to go with the smallest time period possible. Besides, if a 503 doesn't have that header, clients should technically revert to handling it as if it were a 500 response.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4
Reply Quote
Hi,

i hope i haven't misunderstood something here but am i the only one who is always getting the "LIMITED" message, when trying to get an HeroProfile? I tried it i guess yesterday and the day before that aswell as today and i never got a real profile.
Am i doing something wrong or is this function currently not available?

I'm trying it with serveral Battle.Net IDs, for example my own:
http://eu.battle.net/api/d3/profile/Atrion-1705/hero/1


Isn't this the request, people are using to show a hero and the items of the hero in their applications?

Thanks for any help,
Atrion.
Reply Quote
Is there any way we can get a list of all possible error codes?

It would be very helpful for error handling.
Reply Quote
Hi,

i hope i haven't misunderstood something here but am i the only one who is always getting the "LIMITED" message, when trying to get an HeroProfile? I tried it i guess yesterday and the day before that aswell as today and i never got a real profile.
Am i doing something wrong or is this function currently not available?


You are using an invalid hero id in your request (which should have resulted in a 404). You should get a list of your heroes and their associated ID numbers first by making a request to:
http://eu.battle.net/api/d3/profile/Atrion-1705/

For example, your witch doctor results in this request:
http://eu.battle.net/api/d3/profile/Atrion-1705/hero/1445057
Reply Quote
Oh damn... I thought its like this:
http://eu.battle.net/api/d3/profile/Atrion-1705/hero/1
because its the first hero in my Battle.Net ID. Thank you for your help Kalence.

Atrion
Reply Quote
Web & Mobile Team
Just to confirm, you should be getting a 404 for invalid career and hero urls. It looks like there is a bug where the "LIMITED" error code is returned instead. I'll bring it up when I get back to the office.

An example URL that should 404 would be:

http://us.battle.net/api/d3/profile/Straton-1/
Reply Quote
I am getting a 200 OK with

http://us.battle.net/api/d3/profile/Straton-1/

showing:

{
"code" : "OOPS",
"reason" : "There was a problem processing the request."
}
Edited by XjSv#1677 on 8/20/2012 6:46 AM PDT
Reply Quote
Is there any updates on this?

I keep getting the LIMITED error along with "The application is in limited mode" when i do multiple consecutive gets.

I am doing:

Get Career data
Loop through hero's and get data
Loop through hero items and get item data


I am doing this for 9 multiple battlenet tags.

Am i making too many requests per sec or min?
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]