Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to create or update integrations with email filter rules #315

Closed
gerardocorea opened this issue Mar 19, 2021 · 5 comments · Fixed by #385
Closed

Add ability to create or update integrations with email filter rules #315

gerardocorea opened this issue Mar 19, 2021 · 5 comments · Fixed by #385
Milestone

Comments

@gerardocorea
Copy link
Contributor

The pagerduty api supports fields for email integrations that allows specification from regex's and how to handle creation of incidents. Adding in structs for these properties can make it easier to manage these rules.

https://developer.pagerduty.com/api-reference/reference/REST/openapiv3.json/paths/~1services~1%7Bid%7D~1integrations~1%7Bintegration_id%7D/put

Example API call that can be used below.

{
  "integration": {
    "id": "ID",
    "type": "generic_email_inbound_integration",
    "summary": "Email",
    "self": "https://api.pagerduty.com/services/ID/integrations/ID",
    "html_url": "https://test.pagerduty.com/services/ID/integrations/ID",
    "name": "Email",
    "service": {
      "id": "ID",
      "type": "service_reference",
      "summary": "import-csv",
      "self": "https://api.pagerduty.com/services/ID",
      "html_url": "https://ukg-dev.pagerduty.com/service-directory/ID"
    },
    "created_at": "2021-03-18T13:52:41-04:00",
    "vendor": {
      "id": "PBPQJ1M",
      "type": "vendor_reference",
      "summary": "Email",
      "self": "https://api.pagerduty.com/vendors/ID",
      "html_url": null
    },
    "integration_email": "import-csv@test.com",
    "email_incident_creation": "on_new_email_subject",
    "email_filter_mode": "or-rules-email",
    "email_filters": [
      {
        "subject_mode": "always",
        "subject_regex": null,
        "body_mode": "match",
        "body_regex": "test",
        "from_email_mode": "always",
        "from_email_regex": null,
        "id": "ID"
      },
    ],
    "email_parsers": null,
    "email_parsing_fallback": null
  }
}
@theckman
Copy link
Collaborator

@gerardocorea I'm an outside contributor to this repo, but PagerDuty has set a policy of not supporting undocumented API features in the client. As best I can tell the field you refer to isn't documented on that URL, and so we cannot support this functionality until they add documentation for it.

@stmcallister would you be able to also relay the request that this be documented?

@theckman theckman added the undocumented feature This PR or issue is trying to make use of a feature not yet documented by PagerDuty label Mar 19, 2021
@gerardocorea
Copy link
Contributor Author

Sounds good, I have a working version of this which im sure could use some feedback. If there also a way in which I can contribute back the documentation please feel free to let me know.

@theckman
Copy link
Collaborator

@gerardocorea sorry that I missed your question before now. As I recall, that's something that internal product folks at PagerDuty need to do. I had asked the same question once. 😉

@theckman
Copy link
Collaborator

@theckman theckman added this to the v1.5.0 milestone Nov 12, 2021
@theckman theckman removed the undocumented feature This PR or issue is trying to make use of a feature not yet documented by PagerDuty label Nov 13, 2021
@theckman
Copy link
Collaborator

I raised #385 to address this feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants