usds / playbook

The Digital Services Playbook
https://playbook.cio.gov/
1.43k stars 330 forks source link

Default to open: APIs should be versioned #224

Closed aepstein closed 4 years ago

aepstein commented 5 years ago

A tweak to the general recommendation to create APIs. APIs, especially new ones, should always be versioned. Versioning just entails encapsulating the API in a namespace like "/api/v1/". The reason for doing this is that if you need to ship a later version that has backward-incompatible features (maybe you tweak the data model or semantics), this structure makes it easy to do so without breaking the ecosystem that was built around the earlier release.

Inspired by this observation: https://twitter.com/longhotsummer/status/1126473395355435008