这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 8, 2019. It is now read-only.
This repository was archived by the owner on Feb 8, 2019. It is now read-only.

create_event 'details' field should be optional #53

@pataquets

Description

@pataquets

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/...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions