I want a list of URLs that will download artifacts from Artifactory. The list of URLs should come from a REST query.
I am successfully calling the Artifactory (3.2.2) REST API for various data I need. In one case, I am doing a property search, searching for artifacts with an "application_name" and "release_version". These properties were added by TeamCity when the artifacts were deployed. I can successfully search Artifactory using the Artifactory Property Search tool in the web console, and I can successfully search with those same terms from my python script.
The REST call returns json. Within that json is an array of dicts, and each of those is a {uri: url}. All good, but not quite.
The URL returns a 404 when pasted into a web browser. By walking thru the url, I discover that the /api/storage part is what's throwing off the browser. I suspect that's because this URI is not meant for browsers, but for another REST query. Sheesh.
The documentation is not clear on this. It sure seems like I should be able to get a proper browser URL from a REST call.
Example URL: "http://ourserver.org:8081/artifactory/api/storage/our-releases/com/companyname/Training/1.7.4/Training.ipa"
It's easy to replace "/api/storage" with "/simple" in that URL string and that makes the URL work in a browser. I just think it's an ugly solution. I mostly think I'm missing something, perhaps obvious.
Suggestions welcome!