Artifact Version Search

JFrog REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Search for all available artifact versions by GroupId and ArtifactId in local, remote or virtual repositories.

Search can be limited to specific repositories (local, remote and virtual) by settings the repos parameter.

Release/integration versions: Unless the version parameter is specified, both release and integration versions are returned. When version is specified, e.g. 1.0-SNAPSHOT, result includes only integration versions.

Integration versions are determined by the Repository Layouts of the repositories searched. For the integration search to work the repository layout requires an 'Artifact Path Pattern' that contains the baseRev token and then the fileItegRev token with only literals between them.Repository Layouts

Remote searches: By default only local and cache repositories are used. When specifying remote=1, Artifactory searches for versions on remote repositories. NOTE! that this can dramatically slow down the search.

For Maven repositories the remote maven-metadata.xml is consulted. For non-maven layouts, remote file listing runs for all remote repositories that have the 'List Remote Folder Items' checkbox enabled.

Filtering results (Artifactory 3.0.2+): The version parameter can accept the * and/or ? wildcards which will then filter the final result to match only those who match the given version pattern.

Since: 2.6.0

Notes: Requires Artifactory Pro

Security: Requires a privileged user (can be anonymous)

Usage: GET /api/search/versions?[g=groupId][&a=artifactId][&v=version][&remote=0/1][&repos=x[,y]]

Produces: application/json (application/vnd.org.jfrog.artifactory.search.ArtifactVersionsResult+json)

Sample Output:

GET /api/search/versions?g=org.acme&a=artifact&repos=libs-release-local
{
"results": [
    {
        "version": "1.2",
        "integration": false
    },{
        "version": "1.0-SNAPSHOT",
        "integration": true
    },{
        "version": "1.0",
        "integration": false
    }
]
}