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

Support for creating Event Rules with "Template Extractions", via go-client library #421

Open
ricardoasmarques opened this issue Feb 7, 2022 · 4 comments

Comments

@ricardoasmarques
Copy link

According to the API documentation, it's possible to create an "Event Rule Extraction" using a template (instead of a regex):

Screenshot from 2022-02-07 11-39-49

This same option is available when creating an Event Rule via UI;

Screenshot from 2022-02-07 11-41-21

But It's not possible to do it via go-client library:

Screenshot from 2022-02-07 11-45-19

Is it possible to add support for creating "Event Rule Extraction" using a template, via go-client library?

@ricardoasmarques ricardoasmarques changed the title Support for creating Event Rules with "Template Extrations", via go-client library Support for creating Event Rules with "Template Extractions", via go-client library Feb 7, 2022
@theckman
Copy link
Collaborator

@ricardoasmarques can you please point me more precisely within the documentation where it says a template can be used? I took a look at the link, expanded all fields, and do not see template anywhere on the page.

The reason I ask is that a requirement for functionality being added to this package is that it's clearly documented on that API docs site.

@theckman
Copy link
Collaborator

Also, sorry for not replying sooner. I somehow missed this issue. 🤦‍♂️

@ricardoasmarques
Copy link
Author

@theckman it's a bit hidden in the documentation.

You have to navigate to https://developer.pagerduty.com/api-reference/b3A6Mjc0ODIwNw-create-an-event-rule-on-a-service and then expand rule > actions > extractions, then you will see a dropdown next to the extractions field:

Screenshot from 2022-03-21 08-59-41

Select the second option on that dropdown, and you will see the documentation for template:

Screenshot from 2022-03-21 09-06-33

@theckman
Copy link
Collaborator

theckman commented Mar 22, 2022

Yikes. So looking at that we're probably going need a breaking change to support this. 🤦 I guess we could add the field, and add a check for both target and regex being set... if so then return an error.

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

No branches or pull requests

2 participants