Artifact management system is JFrog Artifactory Pro X.
According to REST API of JFrog in my Jenkins job with REST API I try to get latest artifact version of a specific package, in this case the id is "MyLib".
My NuGet package is stored here: https://artifactory.myserver.net/artifactory/api/storage/projectx-nuget/MyLib/MyLib.1.0.0.nupkg?properties=nuget.version
, which results in following JSON response:
{
"properties" : {
"nuget.version" : [ "1.0.0" ]
},
"uri" : "https://artifactory.myserver.net/artifactory/api/storage/projectx-nuget/MyLib/MyLib.1.0.0.nupkg"
}
Also with following URL: https://artifactory.myserver.net/artifactory/api/storage/projectx-nuget/MyLib/MyLib.1.0.0.nupkg?properties=nuget.id
I get valid JSON response:
{
"properties" : {
"nuget.id" : [ "MyLib" ]
},
"uri" : "https://artifactory.myserver.net/artifactory/api/storage/projectx-nuget/MyLib/MyLib.1.0.0.nupkg"
}
I tried with following URL https://artifactory.myserver.net/artifactory/api/versions/_any/_any?nuget.id=MyLib
, but got
{
"errors" : [ {
"status" : 404,
"message" : "Not Found"
} ]
}
What is the correct URL to get the latest version, based on the property "nuget.id"?
GET /api/versions/{repo}/{path}?[listFiles=0/1]&[<property key>=<property value>]&[<property key>=<property value>]
, where ´{repo}: Specify a repository to search through or replace with "_any" to search through all repositories´ and ´{path}: Specify a path to search through or replace with "_any" to search through all paths´. So I replaced both variables with ´_any´. – Chris