我正在使用具有artifactory的rest api,我正在尝试获取artifactory中某个存储库中的所有文件,我正在使用的rest api是
http://artifactory/artifactory/webapp/browserepo.html/api/search/creation?0from=long&to=long&repos=integration 但是它没有返回我需要的信息,artifactory建议的用法是
/api/search/creation?from=javaEpochMillis[&to=javaEpochMillis][&repos=x[,y]]我试图抓住每一样东西在集成存储库,但我没有运气。
发布于 2016-10-20 14:52:53
我不确定我是否100%理解了你的意思,所以我将介绍一下出现在我脑海中的两种情况: 1.如果你试图下载所有的工件-你正在使用的REST API用于搜索,正如你在URL:'/api/ search /‘中所看到的,目前没有REST可以根据特定的创建日期下载所有的工件。为了实现这一点,您可以编写一个简单的脚本,从上面的REST API中获取结果,并下载该列表中提供的所有构件。2.如果你只是想获取一个工件列表,而不是下载它们--我已经在我的电脑上试过了,它似乎工作得很好: curl -iuadmin:password "http://localhost:8081/artifactory/api/search/creation?from=1476341107000&to=1476427507000&repos=ext-release-local“HTTP/1.1200OK服务器: Artifactory/4.13.0 X-Artifactory-Id: 4e650fb6a9d3c7c6:6d70a648:157e0d5c020:-8000内容类型: application/vnd.org.jfrog.artifactory.search.ArtifactCreationResult+json传输编码:分块日期:清华,2016 06:50:58 GMT
{ "results“:[{ "uri”:"http://localhost:8081/artifactory/api/storage/ext-release-local/multi1/multi1/3.5/multi1-3.5-sources.jar","created“:"2016-10-13T10:55:06.781+02:00”},{ "uri“:"http://localhost:8081/artifactory/api/storage/ext-release-local/multi1/multi1/3.5/multi1-3.5-sources.pom","created”:"2016-10-13T10:58:42.506+02:00“},{ "uri”:"http://localhost:8081/artifactory/api/storage/ext-release-local/multi1/multi1/3.5/multi1-3.5-tests.jar","created“:"2016-10-13T10:56:16.655+02:00”},{ "uri“:"http://localhost:8081/artifactory/api/storage/ext-release-local/multi1/multi1/3.5/multi1-3.5-tests.pom","created”:"2016-10-13T10:58:42.513+02:00“},{ "uri”:"http://localhost:8081/artifactory/api/storage/ext-release-local/multi1/multi1/3.5/multi1-3.5.jar","created“:"2016-10-13T10:52:23.166+02:00”},{ "uri“:"http://localhost:8081/artifactory/api/storage/ext-release-local/multi1/multi1/3.5/multi1-3.5.pom","created”:"2016-10-13T10:56:41.267+02:00“}]}
你能仔细检查一下你的“long”是不是像其他人期望的那样是Millisec的?
https://stackoverflow.com/questions/40140081
复制相似问题