-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Design APIv3 #4286
Comments
Would this API also be read only? |
I would say that it shouldn't be but if it helps to get it out the door it could be read-only to start and add write capability to the same endpoints later. Adding write capabilities means having to do some form of authentication which the current API doesn't really do at all (it will use your session token if you make the call from the browser but that's about it). Getting auth right is hard and will require good amount of work and testing. |
This is now not such a big deal! https://readthedocs.org/api/v2/project/?slug=pip
This is still true but it is at least better with the documentation and filtering that went live today.
I think a good idea here is to start just writing down the endpoints we think we need and what they should return. We know (I don't but I could if I looked hard enough) what API endpoints the build system uses. We know what API endpoints public documentation needs: the footer API. Here's some thoughts to get the creative juices going:
|
Just to add a note based on a discussion with @agjohnson, I think APIv3 should require authentication. The lack of authentication in APIv1 and APIv2 makes upgrading/deprecation a huge pain. Currently, we don't have a good idea who is using the API and for what. On a similar note, the default for the API should probably be to show "my" projects and builds rather than all projects and all builds. I think this would make the API considerably more usable. |
One drawback of this would be that if somebody needed to use the API during a build, they would need a way to expose their API key securely to the Read the Docs builder. |
A way to expose their api key can be with #3992 |
I was looking for this and I couldn't find it. Thanks. |
Couple of things I would definitely like to see:
|
We don't do anything special with generated index files. If anything this data will make its way into our search, but I don't know if it would warrant it's own api endpoint |
Request from #4649
|
Request from #4650
|
At a high level, ideally the API wouldn’t be a bolt-on consideration after the service is created, but would be the foundation on which a service is built, such that all actions available in the UI are also available in the API because the UI relies on the API to perform its operations. I realize such an approach may not be a good fit for this project in its current state, but it may be worth considering at this juncture. If you could build a v3 API that is designed to supply the complete suite of operations demanded by any client, it will help avoid cases where some basic features (like project creation) aren’t available through an API. |
Request from #2725
|
I update the description of this issue to write what we talked in our meeting last week and the decisions we made. I will start modifying the document proposed at #4863 soon. |
We have been talking about creating a new APIv3 since APIv1 is deprecated (uses old non-maintained 3rd party libs) and APIv2 is not as useful as we want (we can't query anything by
slug
for example).This issue is a way to collect data/info/thoughts and start writing a document with the design proposed before coding anything new.
I also raised the idea of using GraphQL in another issue, #4182
Suggested documents/videos/etc:
Core, feel free to edit the list below. We can use cases here to build up our opinions on what apiv3 needs
What are the problems with apiv2?
Decisions made by Core Team
We are going to split the work in different phases, aiming to keep it simple but start offering an API with useful features as soon as possible.
Phase I
slug
adding them to the URL:/api/v3/projects/pip/
Next phases
Nice to have
Considerations
slug
orid --return the
id` on the detailed responseThe text was updated successfully, but these errors were encountered: