Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API versioning #13

Closed
ffont opened this issue Nov 28, 2016 · 2 comments
Closed

API versioning #13

ffont opened this issue Nov 28, 2016 · 2 comments
Labels

Comments

@ffont
Copy link
Member

ffont commented Nov 28, 2016

Should we already start including API versioning in api url endpoints? /api/v1/...?

@ffont ffont added the question label Nov 28, 2016
@alastair
Copy link
Member

Is the mediator domain (m.ac.org) only going to run an API, or other interfaces as well (in which case, do we need /api?

Versioning can be annoying. Some people recommend using subdirectories, some people recommend using headers: http://stackoverflow.com/a/6750376

I know you use v1 in freesound, but I've also used just a number.

In specific answer to your question, yes, I think we should including versioning from the beginning. I don't know which system we should use, though.

@ffont
Copy link
Member Author

ffont commented Nov 28, 2016

The mediator will not only return api calls but also other interfaces, that's why we use /api/.

I think v# is better to just a number # as in my opinion is more self-explanatory.
I don't like the idea of using a header as the information is a lot less explicit, also using sub-directories can be confusing as is clearly separating other mediator's interfaces from API.
Many well-known APIs add version in the url so I think this is a good way to go.
I'll add /api/v1/ for now and see how it works.

ffont added a commit that referenced this issue Nov 28, 2016
@ffont ffont closed this as completed Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants