Retrieve Latest Artifact

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: Returns the latest artifact version from the specified destination.

Latest Maven Release/Integration : Specify SNAPSHOT or [RELEASE] for the version in the requested path to get the latest Maven integration or release artifact.

Latest Non-Maven Release/Integration : Specify [INTEGRATION] and [RELEASE] for the version in the requested path, (replacing [folderItegRev] and [fileItegRev] ),

as defined by the repository's Repository Layouts) to get the latest integration version or latest release version artifact accordingly based on alphabetical sorting.Repository Layouts

Integration and release tokens cannot be mixed together.

You can also use Using Properties in Deployment and Resolution as part of retrieving artifacts to restrict the resolution of artifacts assigned with specific properties.Using Properties in Deployment and Resolution

NOTE:

  • Only local, cache and virtual repositories will be used.

  • To change the retrieve latest behavior to retrieve the latest version based on the created date you can add the following flag to $JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties and add the following flag artifactory.request.searchLatestReleaseByDateCreated=true and restart Artifactory service.

  • Both [folderItegRev] and [fileItegRev] have to be defined in the repository layout.

Notes: Requires Artifactory Pro.

Since: Latest Maven: 2.6.0; Latest non-Maven: 2.6.2

Security: Requires a user with 'read' permission (can be anonymous)

Usage: GET /repo-key/path/to/artifact.ext

Sample Usage:

Download the latest Maven unique snapshot artifact:

GET http://localhost:8081/artifactory/libs-release-local/ch/qos/logback/logback-classic/0.9.9-SNAPSHOT/logback-classic-0.9.9-SNAPSHOT.jar

Download the latest release artifact:

GET http://localhost:8081/artifactory/ivy-local/org/acme/[RELEASE]/acme-[RELEASE].jar

Download the latest integration artifact:

GET http://localhost:8081/artifactory/ivy-local/org/acme/1.0-[INTEGRATION]/acme-1.0-[INTEGRATION].jar