Duane Mattos
Duane Mattos

Reputation: 1

Fisheye REST API call: 'Method not allowed' error 405 on repository start

I have created a repo using the rest API, and now I would also like to start it. It is enabled, so I know that starting it is an option (the option to start via the GUI is visible.)

I have tried posting this in a browser – http://crucible:8060/rest/api/1.0/rest-service-fecru/admin/repositories/development_services.newtools/start

And I have also tried using a Python script. The JSON of the request sent to the server looks like:

{'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='}

Here is the response:

<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>

Upvotes: 0

Views: 797

Answers (1)

grzlew
grzlew

Reputation: 590

You're using wrong URL and HTTP method. You should POST an request to

/rest-service-fecru/admin/repositories-v1/

See

Upvotes: 0

Related Questions