Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-12490

Creating webhooks via API fails

    XMLWordPrintable

Details

    Description

      Request:

      curl --request POST
      --url https://api.bitbucket.org/2.0/repositories/owner/slug/hooks
      --header 'authorization: Basic 123456789'
      --header 'cache-control: no-cache'
      -header 'content-type: multipart/form-data; boundary=--011000010111000001101001'
      --form 'description=Webhook description'
      --form url=path_to_yrl
      --form active=true
      --form events=repo:push

      Response:

      {"error": {"message": "You cannot access body after reading from request's data stream", "id": "0b76372bbec44767bbeb5b06d80cc256"}}

      I simply can't create a webhook via API. I can read webhooks with no problem. At first I was using PHP to call the api and then I move to various POST apps from Chrome store to eliminate mistakes on my part.

      Attachments

        Activity

          People

            Unassigned Unassigned
            8e20e25ce3da azash123
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: