如何检查人工制品是否存在?

How to check if an artifactory artifact exists?

我有工件的路径,但我不想下载它,只是检查它是否存在。 "cheapest/fastest" 实现它的方法是什么?

我想我已经知道了...

我可以使用 HEAD-http 方法。

你也可以使用'search' in JFrog CLI:

$ jfrog rt s libs-release-local/Bazinga --count
[Info] Searching artifacts...
[Info] Found 1 artifact.
1

$ jfrog rt s libs-release-local/Bazingaaaaa --count
[Info] Searching artifacts...
[Info] Found 0 artifacts.
0

在这里添加一个答案,以防其他人像我一样寻找这个。

隐藏在文档中,您可以对 http://{your_artifactory_url}/api/storage/{path/to/file} 执行 GET 查询。确保您允许重定向。

请注意,这与您用于 PUT 文件的 url 不同。