5

http://api.stackoverflow.com/0.8/help works.
http://api.stackoverflow.com/1.0/help does not.

Is there something that returns 0.8 as the most recent version? And/or is there something that lists every version?

1

3 Answers 3

6

Currently there is only one version alive at a time (0.8). While in beta, I'm guessing this will be the norm.

Once out of beta, there will probably be an upgrade period for minor versions ("1.1 is released! Update your 1.0 apps!"). However, for major versions there will be two api's running at the same time (1.0 and 2.0).

From the original API announcement:

3. If you build to our API, we will support you. We will be ultra responsive to your feedback during this private beta. And once the API is released, we vow to support version 1.0 of the API for a long time — and if there is a version 2.0, it will be supported in parallel with 1.0 for as long as we can. We’re honored you would write code against our API and we plan to return the favor by not breaking your code a year down the line.

5

First of all, I completely agree with Joel Potter's answer. However, here, I want to respond to the feature-request part of your question.

I think that the Team needs to implement a small feature here on StackApps that was present during the private beta.

I'm referring to a small banner at the top of each page here (the ones that are usually used on Trilogy sites before planned downtimes). This banner should tell us the current status of the API and what version of the API is the newest.

Of course, once we reach multiple API versions (as explained in Joel Potter's answer), we might have this still display the latest version but also link to a page with all versions.

1
2

Well /stats indicates (current) API version

{
  "statistics": [
    {
      "total_questions": 39206,
      "total_unanswered": 6161,
      "total_answers": 95349,
      "total_comments": 135925,
      "total_votes": 299689,
      "total_badges": 61312,
      "total_users": 37454,
      "questions_per_minute": 0.08,
      "answers_per_minute": 0.16,
      "badges_per_minute": 0.10,
      "api_version": {
        "version": "0.8",
        "revision": "1.0.1234.5678"
      }
    }
  ]
}
2
  • 4
    /stats is version-specific. you need to know if particular API version exists before calling it. Commented May 22, 2010 at 4:48
  • 1
    Maybe you could check for a 404 HTTP response to an API URL like "api.stackoverflow.com/1.0/stats" to make sure it exists before you use it. Otherwise, a feature request to have the base URL "api.xyz.com" return the current version as a header would be good.
    – Justin Biard
    Commented May 22, 2010 at 16:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .