GitLab Registry API new endpoint GET most recent image tag details
Proposal
Add a GET API endpoint for the Registry API to get the most recently pushed container image details.
The current GitLab API for registries (https://docs.gitlab.com/ee/api/container_registry.html) does not seem to have any endpoint for getting the most recently created image in a given registry repository. I recently had a use case where I needed to get details of the most recently created image, and our projects do not allow the use of "latest" tag, so I had to craft a small script to make separate API calls (one to get a list of all tags, and the second to call the details API for each of those tags, which contains the "created_at" field, then compare that field on every tag to extract the latest). There does not seem to be a way to order the responses, they are returned in a random order. I feel that an API on GitLab's end could easily achieve this with a query and return the most recent image details and take the burden off of the user to implement this. Additionally the method I had to use will only grow with time and get slower since it has to loop through every single tag's details. I apologize if this feature does exist, but I was not able to locate any documentation or an existing feature requests.