dropbox / pygerduty

A Python library for PagerDuty.
MIT License
163 stars 72 forks source link

Bad URL: /incidents/{ID}/log_entries/count #80

Open jjinno opened 5 years ago

jjinno commented 5 years ago

For tracking purposes.

The v2 REST API no longer officially supports the /count path. Although empirical evidence would suggest it still exists for /incidents/count, there is no documentation supporting this, and plenty of support conversations suggesting otherwise. This is especially true for sub-container elements such as Incident.log_entries

To be v2 compliant, all count() calls should be changed to use the documented total=true parameter on a single paginated request. The use of limit=1 should theoretically allow for the smallest possible request, though some testing on older incidents seems to suggest that this must be limit=2 or higher to avoid HTTP errors.

jjinno commented 5 years ago

PR #83 (fyi)