Speeding up calling api endpoint to get deploys for a site

Hello

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

https://api.netlify.com/api/v1/sites/${site_id}/deploys

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