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
Project API: Add "project" to the URL path #1812
Comments
The proposal from our call regarding what's returned on different parts of the path:
This should be the most clear for developers using the API + it allows access to all the relevant data in a consistent way. |
Sounds good to me, thanks @kshalot. @Rutvikrj26 please could you reorganise the API following this pattern? |
I think this leads to bad habits. If you're doing something automated, you generally don't want to know "what is the latest version", you want to know "what is the latest version with a specific major version number" or even a specific major and minor version. (For example, I think the current behavior of wfdb-python is poorly designed in this regard.) I would suggest that, for example, Not supporting "latest" encourages better practices from application developers which in turn gives data authors the freedom to make large-scale improvements. |
See: MIT-LCP/wfdb-python#439 for some related discussion about |
@bemoody When I think about this a little more, since For retrieving data, I agree that we should be trying to ensure people fix the (major) version. If people are just trying to get information about the latest version, it seems less of a problem to do this via |
I'm not sure what distinction you're trying to draw, what is "metadata" and what is "data"? Do you have a concrete example of an application that really needs to be able to query "what are the details of the latest published version of mitdb?" in a single request, and wouldn't be satisfied by "what versions of mitdb are published?" followed by "what are the details of version 1.0.0 of mitdb?" |
The API that was added in In #1697 has two endpoints: /api/v1/published and /api/v1/published/SLUG/VERSION.
In future we may want to serve non-project information (e.g. platform details; user details; license details; news items; etc), so should
project
appear in these path?e.g. should the URLs be
/api/v1/project/published
and/api/v1/project/published/SLUG/VERSION
?The text was updated successfully, but these errors were encountered: