JavaScript is required to use Bungie.net

Group Avatar

BungieNetPlatform

"Updates, discussions, and documentation of the BungieNetPlatform API."

Request Join
originally posted in:BungieNetPlatform
11/18/2015 2:51:03 AM
4

Advice: APIs stopped working suddenly? Check for maintenance.

The majority of the recent threads I've seen in this forum have been about stuff not working, which going by post timestamps, has been mostly due to applications/developers trying to access the API during maintenance windows. If you can't log into Destiny, chances are the APIs might not be working either. This is quite normal really and Bungie do make the effort to tell everyone that stuff is going offline up to a week in advance. The best thing you can do is put checks in place to catch when data isn't returning what it should be. Here are a few things you can do that will save you problems later: - start with a request timeout fallback for when their servers are under heavy load (ie whenever DestinyTracker releases another fantastic API crunching tool). - make sure to check the returned data is JSON when you are expecting JSON because sometimes you might get a html page - make sure that anything that will be output to a screen has some sort of check or default value as you might find yourself with a null definition etc - try to disable API access when you know maintenance is underway That being said, I really would like to see some kind of static url feed where developers could get information about maintenance windows as you could use that to know when your app should disable API access rather than through catching exceptions.

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Okay, so the most helpful thing (and what the BNet app itself uses) is the GET /Platform/Settings/ endpoint. You'll receive a lot of information - you should inspect it when you get the chance, there's lots of info that could be useful to you in there - but for this in particular what you're going to want to check out is the "systems" property in the response. It has various settings, including whether certain systems are enabled or disabled. "Destiny" is the core system for all Destiny calls, but you'll see a variety of other systems in there. I imagine you'll care the most about those prefixed with "Destiny": check them out, they should be fairly self explanatory. If you see one whose meaning isn't clear, let me know and I can explain more here! Anyways, your server and apps should periodically check for this data, and potentially if you start getting unexpected failures you could refresh this data as well. This should give you at least as much information as our site and mobile apps get in regards to what systems are online.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    2 Replies
    • Ha, if it helps the heavy load situations usually haven't traced back to any specific API user - you all have been very good members of the dev community, and I appreciate it! Hang tight, I'll give you all some information shortly about how we check for offline status on our mobile application - you all should be able to use that to your benefit and show the appropriate messages or what-have-you with that information.

      Posting in language:

       

      Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    • lol don't be blaming us,.

      Posting in language:

       

      Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    • I'll add that there are response codes for when maintenance is occurring. With recent downtimes, however, I've realized one may not ALWAYS get that specific code during maintenance, such that one does need to make sure you're using defaults to prevent null errors like lowlines said.

      Posting in language:

       

      Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    You are not allowed to view this content.
    ;
    preload icon
    preload icon
    preload icon