Fisheye REST API调用:存储库启动时出现'方法不允许'错误405

时间:2016-04-08 13:04:07

标签: rest atlassian-fisheye

我使用其余的API创建了一个repo,现在我也想启动它。它已启用,因此我知道启动它是一个选项(通过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>

1 个答案:

答案 0 :(得分:0)

您使用的是错误的网址和HTTP方法。您应该将请求发送到

  

/休息服务-fecru /管理/存储库-V1 /

See