Closed pataquets closed 7 years ago
Usign the following 'curl':
curl --insecure -H "Content-type: application/json" -H "Authorization: token yoursecretkey" -X POST -d '{"service_key":"MY_OPENDUTY_SERVICE_KEY","event_type":"trigger","description":"test","incident_key":"1234567"}' https://SCRUBBED/api/create_event
Gives:
KeyError at /api/create_event ****** 'details'
If I provide the details field, the incident is created OK.
Conversely, the following:
curl --insecure -H "Content-type: application/json" -H "Authorization: token yoursecretkey" -X POST -d '{"service_key":"MY_PAGERDUTY_SERVICE_KEY","event_type":"trigger","description":"test","incident_key":"1234567"}' https://events.pagerduty.com/generic/2010-04-15/create_event.json
returns:
{"status":"success","message":"Event processed","incident_key":"1234567"}
The API docs at https://v2.developer.pagerduty.com/docs/trigger-events do not flag details field as required. It is making the integration with the PagerDuty Drupal module fail, since the module function correctly handles the details field as optional, as shown on this line.
If this can be easily solved, I think that OpenDuty will be swappable with PD when I finishthe module's customization to allow it to use a endpoint URL other than https://events.pagerduty.com/...
Usign the following 'curl':
Gives:
If I provide the details field, the incident is created OK.
Conversely, the following:
returns:
The API docs at https://v2.developer.pagerduty.com/docs/trigger-events do not flag details field as required. It is making the integration with the PagerDuty Drupal module fail, since the module function correctly handles the details field as optional, as shown on this line.
If this can be easily solved, I think that OpenDuty will be swappable with PD when I finishthe module's customization to allow it to use a endpoint URL other than https://events.pagerduty.com/...