我遇到了一个问题,在使用 AQL 时,我无法获取对构建域对象进行的任何查询以返回
当我进行以下卷曲时:
curl -X GET -H "X-JFrog-Art-Api: myArtifactroyKey" -H "Cache-Control: no-cache" "https://MyArtifactoryServer/artifactory/api/build/"
我得到一组结果:
{
"builds": [
{
"uri": "/someBuild",
"lastStarted": "2017-02-15T22:02:49.066+0000"
},
{
"uri": "/someOtherBuild",
"lastStarted": "2017-02-15T21:45:09.590+0000"
},
"uri": "/someThirdBuild",
"lastStarted": "2017-02-15T21:17:38.794+0000"
}
],
"uri": "https://myArtifactoryServer/artifactory/api/build"
}
所以我知道我的 Artifactory 中有构建
但是,当我进行以下 curl 时,我认为它会请求所有具有任何名称的构建,但我没有得到任何结果
curl -X POST -H "X-JFrog-Art-Api: myArtifactroyKey" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'builds.find({"name": {"$match":"*"}})' "https://MyArtifactoryServer/artifactory/api/search/aql"
返回:
{
"results": [],
"range": {
"start_pos": 0,
"end_pos": 0,
"total": 0
}
}
使用时我已经能够获得结果,items.find()
但没有任何运气builds.find()
我错过了什么吗?
我的总体意图是有一个查询,它根据名称返回特定构建的最新构建信息,但我什至无法让针对构建域对象的最简单的查询起作用。
在此先感谢您的帮助。