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

Allow for generation of events-api-v2 service integration #40

Merged
merged 2 commits into from
Oct 3, 2017
Merged

Allow for generation of events-api-v2 service integration #40

merged 2 commits into from
Oct 3, 2017

Conversation

mathyourlife-fitbit
Copy link
Contributor

The events v1 api is deprecated. Adding support to generate events api v2 tokens for services.

WHEN DOES THE SUPPORT FOR THE PREVIOUS API VERSION END?
API v1 will be supported until February 6, 2018. If you find yourself in a unique situation that
requires an extension, please contact our support team at support@pagerduty.com.
As of July 6, 2016, no new features will be released for v1.

https://v2.developer.pagerduty.com/v2/docs/api-v2-frequently-asked-questions

Sample curl request:

curl -X POST 'https://api.pagerduty.com/services/{id}/integrations' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.pagerduty+json;version=2' \
  -H 'Authorization: Token token={api token}' \
  --data-binary '{"integration":{"type":"events_api_v2_inbound_integration","name":"events v2 api"}}'

@heimweh
Copy link
Collaborator

heimweh commented Oct 3, 2017

Hi @mathyourlife-fitbit, thank you so much for this PR! 👍

This looks good to me (confirmed that it works).

Would you mind adding this type to the list of available types in the resource documentation?
it's in website/docs/r/service_integration.html.markdown, also it would be worth adding a note that this type requires alert_creation to be set to create_alerts_and_incidents in the service.

Many thanks,

Alexander

@mathyourlife-fitbit
Copy link
Contributor Author

I had already added the option to website/docs/r/service_integration.html.markdown.
I added the note that services require the create_alerts_and_incidents setting for a v2 api.

@heimweh
Copy link
Collaborator

heimweh commented Oct 3, 2017

Hi @mathyourlife-fitbit, sorry I completely missed that.

This LGTM! 👍 huge thanks!

@heimweh heimweh merged commit a253fcd into PagerDuty:master Oct 3, 2017
@mathyourlife-fitbit
Copy link
Contributor Author

Not a problem. Thanks for the quick review, @heimweh .

@jamielennox jamielennox mentioned this pull request Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants