Uploaded image for project: 'Opsgenie'
  1. Opsgenie
  2. OPSGENIE-177

Creating a Zabbix integration through the integration API requires optional fields

XMLWordPrintable

      Issue Summary

      When creating a Zabbix integration using the Integration API, sendViaOEC or sendViaMarid are flagged as required fields by default. These should only be needed if "Send Alert Actions to Zabbix" is enabled. 

      Steps to Reproduce

      1. Send a request to the integration API to create a new Zabbix integration using only the mandatory fields: 
        curl -X POST 'https://api.opsgenie.com/v2/integrations' -H 'Authorization: GenieKey XXXX' -H 'Content-type: application/json' -d 
        '{ 
            "name":"zabbix-integration-api", 
            "type":"Zabbix" 
        }'

      Expected Results

      Zabbix integration is created.

      Actual Results

      Response for the above request --->

      {
      "message":"Either sendViaOEC or sendViaMarid should be selected.",
      "took":0.013,
      "requestId":"e4b316d0-6d77-4f2c-98c6-c3fb1a50a52c"
      }  

      Workaround

      Explicitly include the field sendAlertActions:false in your create integration request: 

      curl -X POST 'https://api.opsgenie.com/v2/integrations' -H 'Authorization: GenieKey XXXXX' -H 'Content-type: application/json' -d
      '{
       "name":"zabbix-integration-api",
       "type":"Zabbix",
       "sendAlertActions":false
      }'

            Unassigned Unassigned
            rpratt@atlassian.com Robert
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: