'Unauthenticated API for download of an azure pipeline artifact

The azure pipelines web interface provides a link to download pipeline artifacts on public pipelines regardless of whether your session is authenticated or not. However, the api for getting a download link does not work in this case. HOWEVER however, the download link produced by that API does work if you copy it into an unauthenticated session. How can I obtain a download URL for a public pipeline artifact without authenticating and without scraping the public web interface?

My use case is providing a tool to manually debug CI runs that work locally but fail in CI by replicating the CI environment in a docker container and downloading the exact build used in the failing CI run (a pipeline artifact). The interface I would like to provide for this is a command that takes as an argument a URL of a Github pull request, parses the relevant pipeline parameters out of it, and launches the docker container with the URL of the artifact to download. This should work, and it has worked in the past by scraping the artifact download URL out of the public azure web interface, but this breaks frequently.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source