Pattern search using Artifactory REST API

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Pattern search using Artifactory REST API

gaurav
This post was updated on .
Is there any way in Artifactory to get the list of all the files from single repository through REST API?
I was looking at the "Pattern Search" REST API and it looks like it requires to add "/*" for every empty directory from the structure.

for e.g. GET /api/search/pattern?pattern=libs-release-local:killer/*/ninja/*/*.jar returns all the .jar files from the folder libs-release-local:killer/*/ninja/folder1/ but it does not return any .jar files from folder libs-release-local:killer/*/ninja/folder1/folder2/folder3/

I want to get list of files from all the nested folders just by passing project name.
something like this : GET /api/search/pattern?pattern=libs-release-local:*/*.jar

Reference page from Artifactory: https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-PatternSearch

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Pattern search using Artifactory REST API

itamarb
Hi Guarav,

Have you tried using the File List REST query?
It seems like the perfect fit for what you are trying to accomplish.

Best Regards,
Itamar.
Reply | Threaded
Open this post in threaded view
|

Re: Pattern search using Artifactory REST API

gaurav
Thanks Itamar. Is there any way to add wildcard pattern search in File List REST query?
Reply | Threaded
Open this post in threaded view
|

Re: Pattern search using Artifactory REST API

eranbl
Hi Gaurav,

Although the File List REST call does not support wild-cards you can achieve this (and many other options) using the Artifactory Query Language.

Regards,
Eran

On Fri, Jun 19, 2015 at 1:07 PM, gaurav <[hidden email]> wrote:
Thanks Itamar. Is there any way to add wildcard pattern search in File List
REST query?



--
View this message in context: http://forums.jfrog.org/Pattern-search-using-Artifactory-REST-API-tp7580343p7580345.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users


------------------------------------------------------------------------------

_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users