Versioned Restful API

Hey Paul! Good question. The short answer is that in the near future we don’t have any plans to version the api.

Because discourse itself consumes the same public api I don’t see a point in versioning it separate from the actual discourse versions that are released. I do see the problem you are trying to address though because I have experienced them myself dealing with various API’s and I’m sure there are some improvements we could make like maybe leaving an old endpoint around longer but make it deprecated in addition to adding the new endpoint that replaces it. I think that problem could be solved though through better api documentation and noting what changed between discourse versions.

While obviously it would be great if we could tell you exactly what changed api wise between discourse versions (A goal I do want to achieve at some point, but probably won’t happen until we have a good way of automating the generation of api docs), perhaps if this is a serious requirement for your business needs I think it would be good to setup a staging server for your forum where you can roll out any new version of discourse to, and then test all your api calls before upgrading your production forum.

12 Likes