api v2 schedule endpoint is extremely slow

schedules

(yiwen song) #1

I was wondering why the v2 endpoint for getting schedules seems to be extremely slow?

>>> start = arrow.now(); requests.get('https://api.pagerduty.com/schedules', headers=headers, params={'limit': 100}); print(arrow.now() - start)
0:00:09.016345

I recently changed from using API v1 keys, and this endpoint used to be quite fast (fast enough to query for every team we had). Now, after switching to API v2 keys, it takes almost 30 seconds for us to fetch ~250 schedules.

Is this a known issue? Should I expect this endpoint to be faster in the future, or should I use this endpoint knowing that it’s expected to be this slow for the foreseeable future?


(Jade Paoletta) #2

Hi Yiwen,

There are some differences between the information that we return from our V2 endpoint as opposed to our V1 to list schedules.

Next time you make this call, could you try adding the parameter exclude[]=escalation_policies? This will leave out information about the associated escalation policies and might help to speed up the response.

Thanks!


(system) #3

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.