Speeding up calling api endpoint to get deploys for a site


I was wondering if there was any way to speed up the following endpoint.


When we run it, the endpoint takes more than 20 seconds to complete which seems very long.

Hey there and welcome :slight_smile:

That’s strange! To try to reproduce what you’re experiencing, I curl-ed that endpoint on an internal site with thousands of deploys, and the response came back in under a second, so I’m not sure the problem is with the endpoint. I have a few questions for you that will hopefully help us better understand what may be going on:

  • Does that happen for you on other endpoints?
  • Any timeouts or errors?
  • Does the response return the same data you see in the UI?
  • Are you using any browser extensions or a VPN?
    • I tried to publish a build and got 1400 ms response time
    • grabbing deploys resulted in 19.38 seconds response time
  1. I am not getting any timeouts or errors.

  2. The response data is the same as I see in the UI

  3. I have ad block, uBlock origin, last pass and react dev tools extensions running on chrome but I am calling the endpoints using postman on linux mint

Hi, can you share the site or app ID, or the site name that you’re trying to make this call on? Also do you notice the /deploys page on app.netlify.com loading equally slowly for you? Thanks.

Sorry for the late reply

When loading at the /deploy page, the page loads with the deploy information normally and without the delay I am seeing when calling the api.

The site id is a6332ebd-fdc5-479e-8cd6-f9ae83e2e8ab

you probably need to paginate your request, @jnicholls . That’s how the deploy listing page goes so fast - we’re only asking for 15 results. You can find the way our UI uses pagination following the workflow here:

If you do have a paginated call already, please share the syntax you use since I’d guess it’s not working :slight_smile: