0

I was able to successfully create webhooks via api and was able to fetch from api as well. but am unable to see them in jira dashboard. please check my code here.

    <?php
$webhooksbase = 'https://api.atlassian.com/ex/jira/'.$site_id.'/rest/api/3/webhook';
$data = <<<REQUESTBODY
    {
      "url": "https://webhook.site/839d3c82-5da3-454f-9b70-52f33dc4c6ed",
      "webhooks": [
        {
          "events": [
            "jira:issue_updated"
          ],
          "fieldIdsFilter": [
            "summary"
          ],
          "jqlFilter": "project = TESTRAIL"
        }
      ]
    }
REQUESTBODY;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $webhooksbase);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Accept: application/json',
    'Content-Type: application/json',
    'Authorization: Bearer ' . $result_decode['access_token']
]);
$result_issue = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
 
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
echo 'code:'. $httpcode.'<hr />Response: <br>';
 
?>

why am unable to see the webhooks under administration of my jira section while my api creates and returns... am unable to see its working also... i tried edit some issues and i never got payload.

can someone help on this ?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.