I am trying to fetch data from DockerHub from this URL using the API:
https://cloud.docker.com/u/{account}/repository/docker/{account}/{app}/builds
However, the equivalent API URL is invalid. It returns 404:
https://cloud.docker.com/v2/repositories/{account}/{app}/builds/
On the other hand, the following URL is a valid, but it is not listing the ongoing builds:
https://cloud.docker.com/v2/repositories/{account}/{app}/tags/
Overall, what I would like to do is to get, from the API, the list of images being built in DockerHub. How can I achieve that?
You can use this API to list the builds.
https://cloud.docker.com/v2/repositories/{account}/{app}/buildhistory/
Then append the build_code of a build to see the full detail.
https://cloud.docker.com/v2/repositories/{account}/{app}/buildhistory/{build_code}
I'm not aware of any official documentation for these endpoints. In the past I've used the following source code as a reference.
https://github.com/RyanTheAllmighty/Docker-Hub-API/blob/master/src/api.js