0

So I've tried to make a cURL script that adds a webhook to my repository, but it doesn't work. BitBucket version= Atlassian Bitbucket v7.21.5

curl -u 'usn:pass' -H "Content-Type: application/json" -X PUT -d '{"title":"Title name", "url": "http://webhooklink:5000/sources/bitbucket/webhook", "enabled": "true"}' https://xxxx.com/rest/webhook/1.0/projects/PROJECT/repos/REPO/configurations

I get the following error:

<!doctype html>
<html lang="en">
   <head>
      <title>HTTP Status 405 – Method Not Allowed</title>
      <style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style>
   </head>
   <body>
      <h1>HTTP Status 405 – Method Not Allowed</h1>
      <hr class="line" />
      <p><b>Type</b> Status Report</p>
      <p><b>Description</b> The method received in the request-line is known by the origin server but not supported by the target resource.</p>
      <hr class="line" />
   </body>
</html>

Any ideas on what the issue is? POST doesn't work eaither.

The Mungax
  • 35
  • 2
  • 9

0 Answers0