【发布时间】:2016-03-31 22:42:07
【问题描述】:
我是 Artifactory 的新手。目前我正在开发一个项目来列出存储库中的所有工件。
Artifactory 版本:4.1.3 Pro(关闭证书验证)
curl -u uname:password -X POST -k https://artifactory.xxxx.com/artifactory/api/search/aql -d "items.find({"repo":"war"}).include("name","repo","path","size").sort({"$desc":["size"]}).limit(10)"
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /artifactory/api/search/aql was not found on this server.</p>
<hr>
<address>Apache/2.2.31 (Amazon) Server at artifactory.xxxx.com Port 443</address>
</body></html>
它抛出一个错误(错误请求)。尝试列出以下 repos war,war-dev,war-release,webapp,webapp-dev 中的工件(从 Artifactory 数据库和 http 请求中获取 repos 列表)。
尝试匿名列出使用REST调用的工件,但$ARTIFACTORY_HOME/logs/request_trace.log $ARTIFACTORY_HOME/logs/request.log没有日志
从 artdb(Artifactory 数据库)和 artifactory url 获取 repos 列表。列出的存储库彼此不同。哪一个是正确的?
列出了很多回购
mysql> select distinct(repo) from nodes;
| war |
| war-dev |
| war-release |
https://artifactory.xxxx.com/artifactory/repo/
webapp/
webapp-dev/
请有人帮忙找出 repo 中的工件列表。谢谢!
【问题讨论】:
-
如果您提供 AQL 内联并获得不受支持的媒体异常,您可以通过添加 -H "Content-Type: text/plain" 来解决该问题。
标签: curl artifactory