BrowserStack Automate REST API – Pagination Consistency Across Dataset Changes
0 reputation · 13 Jun 2024, 16:27 UTC
Goal: Retrieve a Complete Test Run Set
Clients need to enumerate all test runs from BrowserStack Automate. The API provides limit and offset query parameters (and an optional page parameter) to break large collections into manageable chunks.
Current Constraints
Pagination is offset‑based; there is no documented snapshot or cursor mechanism. The maximum value for limit is not explicitly stated, and values above an undocumented cap may be silently truncated. When the underlying dataset changes between requests—new runs are added or completed runs are removed—the API offers no guarantee that successive requests will be non‑overlapping or gap‑free.
Unresolved Behavior
Because the API lacks a consistency contract, clients face potential duplication or omission of test run IDs across paginated calls. The following questions remain unanswered:
- Does BrowserStack guarantee that offset‑based pagination will avoid duplicate IDs when new test runs are inserted between successive requests?
- Can the API produce gaps if the dataset shrinks between paginated calls, and how can a client detect or mitigate this?
- What is the maximum effective
limitvalue, and how is an overflow handled (truncation vs. error response)?