Update Webhooks API documentation for Jira 10

XMLWordPrintable

    • 5
    • 11

      The Webhooks documentation is not well defined for the changes between Jira 9x, and Jira 10.x and should be split out into separate documents. Or better clearly defined.

      Endpoint location

      Between Jira 9.x and 10.x the API endpoint has changed, but this change is not well documented in the article.

      For Jira 9.x the endpoint appears to be "<JIRA_URL>/rest/webhooks/1.0/webhook"
      For Jira 10.x the endpoint appears to be "<JIRA_URL>/rest/jira-webhook/1.0/webhooks"

      The difference is only listed in one information box for Jira 10.x, but the rest of the documentation assumes Jira 9.x. This is not as clear as it should be, and efforts should be made to ensure that the distinction in examples is clear.

      Registering/editing a webhook

      The JSON formatting for creating a webhook has changed between Jira 9.x and Jira 10.x but the format for Jira 10.x is not listed anywhere in the documentation.

      For Jira 9.x, the JSON format should look something like:

      {
          "name": "my first webhook via rest",
          "url": "http://www.example.com/webhooks",
          "events": [
          "jira:issue_created",
          "jira:issue_updated"
          ],
          "filters": {
              "issue-related-events-section": "Project = JRA AND resolution = Fixed"
          },
          "excludeBody" : false
      }
      

      But for Jira 10.x, using this will have the JQL ignored completely. This is because the expected format of the JSON has changed to:

      {
          "name": "my first webhook via rest",
          "url": "http://www.example.com/webhooks",
          "events": [
              "jira:issue_updated",
              "jira:issue_deleted"
          ],
          "configuration": {
              "FILTERS": "Project = JRA AND resolution = Fixed ",
              "EXCLUDE_BODY": "false"
          },
          "active": "true"
      }
      

      It appears that the FILTERS and EXCLUDE_BODY must be in upper case.

      Executing a webhook

      The form ?user_id=(u'sysadmin',)&user_key=(u'sysadmin',) does not works in Jira 10.x. The documentation need to be updated.

      This has lead to confusion and frustration for customers.

            Assignee:
            Maria Sobińska
            Reporter:
            Allan O'Rourke
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: