2017-04-19 50 views
0

我需要使用REST API從舊工件手動清理Jfrog工件。無法獲取在特定日期範圍內創建的工件

出於這些目的,首先,我必須識別在特定日期範圍內創建的工件。

的問題是,當我使用

curl -u user:password -X GET "http://artifactory:8081/artifactory/api/search" 

我得到這個錯誤

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

是什麼意思,該方法是不允許的?我該如何處理它?

完整的命令是

curl -u user:password "http://artifactory:8081/artifactory/api/search?from=long&to=long&repos=currentrepo" 

回答

1

您使用REST API錯誤。

這是完整的命令應該怎麼樣子: 捲曲-u管理員:密碼 「http://localhost:8081/artifactory/api/search/日期dateFields =創建從& = 1461052559000 &爲= 1492588559000 &回購=庫快照本地?」

+0

謝謝,它的工作原理! –