Esper API high latency / 30-second timeouts on GET /device/ endpoint: investigate server-side spike windows and align client timeout config
Windows
If you're experiencing timeouts when calling the Esper REST API GET /device/ endpoint, this article helps you diagnose the issue and implement solutions to improve response times.
Before you begin
Timeouts on the GET /api/v0/enterprise/{enterprise_id}/device/ endpoint typically occur when:
- Your client timeout is set too low for your device fleet size
- You're requesting all devices without pagination, creating a large response payload
- Your enterprise experiences periodic backend load spikes
To troubleshoot effectively, you'll need to capture the exact time and details of when the timeout occurs.
Step 1: Document the timeout occurrence
When the next timeout happens, record the following information:
- Exact start and end timestamps (in UTC timezone)
- The complete API request — method, endpoint URL, and all query parameters (such as
limit,offset, orsearchfilters) - How long the request took before timing out
- Whether multiple requests failed or just one
Step 2: Use pagination to reduce response size
If you're calling the /device/ endpoint without parameters, the response may include hundreds or thousands of device records. This increases both payload size and latency. Always paginate your requests using limit and offset parameters:
GET /api/v0/enterprise/{enterprise_id}/device/?limit=100&offset=0
Paginated calls significantly reduce response time and the risk of timeouts. Start with a limit of 100 devices per request, then iterate through results using the offset parameter.
Step 3: Increase your client timeout
Temporarily increase your client-side timeout to at least 60–90 seconds for list endpoint calls. While you implement pagination in Step 2, a higher timeout reduces the likelihood of connection failures during normal backend load variations.
Step 4: Check for known platform issues
Visit your Esper tenant's status page to see if there are any reported API performance incidents or degradation during the time window when you experienced the timeout.
Step 5: Verify the fix
After implementing pagination and adjusting your timeout:
- Make several API calls during normal operating hours and confirm they return within expected latency
- Test paginated calls during periods of higher load on your account
- Monitor response times to ensure they remain consistent
Still need help?
If you continue to experience timeouts after following these steps, or if you need to investigate server-side factors, contact Esper Support. provide:
- Your enterprise ID
- Exact timestamps (UTC) of all timeout occurrences
- Sample API requests showing the endpoint, parameters, and observed response duration
- Whether you're making concurrent bulk API calls or if your application has scheduled jobs hitting the API at high frequency
Please sign in to leave a comment.
Comments
0 comments