2017-05-04 64 views
0

我試圖找到這些時間14938720001493872435上Artifactory的之間創建的所有項目,但我得到405「405不允許的方法」爲Artifactory的API調用

$ curl -X POST -H "X-JFrog-Art-Api: <KEY>" "http://localhost:8081/artifactory/api/search/creation?from=1493872000&to=1493872435&repos=project1" 

{ 
    "errors" : [ { 
    "status" : 405, 
    "message" : "Method Not Allowed" 
    } ] 
} 

有什麼錯我的命令?我正在使用文檔here

並非所有的API調用似乎都適用於我,但curl -H "X-JFrog-Art-Api: <KEY>" -X PUT "http://localhost:8081/artifactory/project1/artifacts.zip" -T artifacts.zip(用於上傳工件)的確如此。

回答

1

使用GET,POST不是:

curl -X GET -H "X-JFrog-Art-Api: <KEY>" "http://localhost:8081/artifactory/api/search/creation?from=1493872000&to=1493872435&repos=project1"