ml-opensource / API-manifesto

Documents how to write APIs
6 stars 5 forks source link

Topic: API Versioning #8

Closed siemensikkema closed 4 years ago

siemensikkema commented 4 years ago
Irving-ML-PH commented 4 years ago

Hi, dropped by here from the MonstarLab slack channel.

So I did some (quick) research on the topic at hand and here is what I've learned,

Conclusion: I would go with the URI strategy largely for the brand-names associated with the strategy and the fact that it makes the chosen version highly visible to the API consumer.

Sources

siemensikkema commented 4 years ago

@Irving-ML-PH Thanks for your research! Yes, the URI based approach is what we'll be recommending. Not so much because the big players do it but because it's easier and clearer IMO 🙂 There are already other places where we deviate from a strict RESTful approach, for instance endpoints where we combine multiple data sources to make it easier for the frontend (think a home-feed for example).

Irving-ML-PH commented 4 years ago

Great! Any thoughts on how the version string should look like? I'm perfectly happy with simple ../v1/.. on the URI, though that's because I haven't designed an API that's mean for public consumption.

siemensikkema commented 4 years ago

@Irving-ML-PH Yeah v1, v2 etc. See my WIP PR: https://github.com/nodesagency/API-manifesto/pull/24/files