PagerDuty / pdpyras

Low-level PagerDuty REST/Events API client for Python
MIT License
129 stars 29 forks source link

How to do api call for api.eu.pagerduty.com ? #108

Closed akhilesh0 closed 11 months ago

Deconstrained commented 1 year ago

Great question!

I recommend updating the url property of the session object:

session.url = 'https://api.eu.pagerduty.com'

Our load balancers have many ways of detecting if a key belongs to a different service region, but it's always better to explicitly use the service-region-specific host name because then traffic will go directly to that service region's load balancers and latency will be lower.

Leaving this open for documentation or improvement.

Deconstrained commented 1 year ago

We'll need to experiment to confirm that the self property uses the region-specific hostname when requesting the resource from api.eu.pagerduty.com (if it doesn't, the above fix won't work). I'm mostly sure this is a non-issue.