readthedocs.org
readthedocs.org copied to clipboard
API: BuildCommands and missing fields to build v3 API
On the new dashboard, the build detail view is still using the v2 API. I would like to eventually rely on APIv3 on the dashboard, as that is the stronger API. I encountered the following data from the v2 API was not implemented in the V3 API however:
- BuildCommands don't seem to be implemented -- this is the largest blocker
- docs_url
- commit_url
- builder (for debugging only, not super important)
I did find I need the following changes once I can use the APIv3 build enpoint:
- add
?expand=configfor the config object
It would help if we could expand the notifications on the build APIv3 call and save the extra polling calls. Without this, that view needs to poll two APIs every two seconds while the build is still active.
For now, I can use the notification API v2 endpoints.
Noting for reference that we may also want to add ?expand=notifications for the APIv3 build endpoint: https://github.com/readthedocs/ext-theme/pull/300#discussion_r1540912107
Pushing this to later, but we should consider fixing up build API v3 for our use high priority and get away from relying on API v2.
I'm not sure exactly how to prioritize this at the moment, I was hoping we'd be farther into APIv3 fixes for permissions probably. I'm going to move this to new dashboard features milestone, even though this isn't much of a feature.