Reputation: 164
I'm trying to use the Artifactory Rest API to retrieve the latest published version of a file. The file in question is a simple zip of a bunch of YAML files used for configuration. I can upload and download these files in TeamCity using File Specs, however I can't find any reference of this functionality in the Rest API docs (or indeed, any way to do almost anything that isn't an action on a maven repository)
Upvotes: 1
Views: 838
Reputation: 1554
You can define and use a custom Repository Layout. This way, in order to download the latest version of the file, you can use the [RELEASE]
placeholder. The actual latest version will be automatically resolved by the extracted version value based on the layout.
See also:
Upvotes: 1
Reputation: 1511
As you are already using the file specs, you can make use of the same file spec and use the Artifactory query language (AQL) to get the list of files. You can refer to example 2 here in this list.
Upvotes: 2