2016-04-08 79 views
0

我已經使用其餘api創建了一個回購,現在我也想開始它。它啓用了,所以我知道,開始它是一個選項Fisheye REST API調用:存儲庫啓動時'方法不允許'錯誤405

我試圖在瀏覽器中張貼這(通過GUI啓動選項可見。) - http://crucible:8060/rest/api/1.0/rest-service-fecru/admin/repositories/development_services.newtools/start

和我一直在使用也嘗試一個python腳本。向服務器發送請求的JSON看起來像:

{'Content-Length': '0', 'Accept-Encoding': 'gzip, deflate', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-requests/2.9.1', 'Connection': 'keep-alive', 'type': 'PUT', 'Authorization': 'Basic ZasdfasdfvczpHb2VzVXAyABC='} 

這裏是迴應:

<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> 
<title>Error 405 Method Not Allowed</title> 
</head> 
<body><h2>HTTP ERROR 405</h2> 
<p>Problem accessing /rest/api/1.0/rest-service-fecru/admin/repositories/development_services.newtools/start. Reason: 
<pre> Method Not Allowed</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> 
<br/> 
</body> 
</html> 

回答

0

你正在使用錯誤的URL和HTTP方法。你應該張貼到

/REST的服務fecru /管理/存儲庫-V1/

See

的請求