Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

I may have missed this before, and if I have, I apologize (I searched and didn't find anything).

Is there a way to discover what the API version for a site is? With the recent change from 0.8 to 0.9, there's been some whining about having to change code and whatnot. Could we mitigate this issue in the future by making the version discoverable?

I think a good place to put this would be the http://stackauth.com/sites endpoint, where each site could now include a "version": "0.9" entry.

share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

Beta is an unusual time, in that the version number changes fairly frequently.

Once we're into 1.0, such changes will basically never happen. You'll always be in 1.0, unless you explicitly target a newer version of the API; which will probably be rife with breaking changes, requiring much more than a recompile.

As such, no discovery mechanism for API versions exists - nor will it - as it will be of 0 utility in the full release.

share|improve this answer
    
+1 Fair enough. –  Dave DeLong Jun 24 '10 at 22:40
    
i agree. there is no valid use case for version discovery that I can see. –  Sky Sanders Jun 24 '10 at 22:49
    
it would be cool if during beta the version number wasn't required in the API call.... beta.api.xxxxxx.com/[method] –  Jason Jun 24 '10 at 22:51
    
@Jason - so, we don't test that required attribute of the API in beta? –  Kevin Montrose Jun 24 '10 at 22:53
    
@kevin - what do you mean "required attribute"? the inclusion of the version? –  Jason Jun 24 '10 at 23:30
    
@Jason - yes, the version number. Its kind of hard to name it; maybe "required parameter" would be better... thats not quite right in terms of code, but better conceptually I guess. –  Kevin Montrose Jun 24 '10 at 23:52
add comment

You must log in to answer this question.

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