I’m trying to find a way to determine the files changed for a given deploy,
https://api.netlify.com/api/v1/sites/fa4dd95a-994e-4f89-8a7a-2d9e9fc36a32/deploys/5e41ae10b7d212b76e357bc4, which although I’ve changed 1 file, has touched 258 files. I realise that a few of those are autogenerated feeds, but honestly there shouldn’t be that many files.
Without any information, thsi is slowing down deployments and generating unnecessary changes to my site!
I’ve searched for “files changed” “deploy diff” on both the forum and through search engines.
No direct endpoint to query this, but you can follow the advice in this post (specifically the second screenshot) to download a copy of each deploy and diff them:
Last reviewed by Netlify Support - August, 2023
Our CDN derives much of its efficiency from files whose checksums don’t change between deploys.
For instance, in a blog, you usually write or update one article in one file, while the rest of the content remains unchanged. In this typical use case, we don’t need to re-upload and re-process these files, since our CDN already has them stored - no checksums have changed except the one file. This also means that your visitors’ browsers don’t need to …
Thanks for the reply - I’ve just tried this, but hit a CORS error:
Just to confirm the steps to reproduce this: did you get this error when you clicked the icon to download a copy of the deploy? If so, my first question is whether there might be browser extensions interfering?
I’ve disabled Firefox’s tracking protection, and my adblocker, and interestingly that works - thanks!
Actually, I lie. It only seems to work for the first deploy. All others that I’ve tried display this CORS error.
Hi, so those api endpoints probably won’t work in the browser (more info about CORS here:
Cross-Origin Resource Sharing (CORS) - HTTP | MDN). If you try your API call in a curl or a netlify lambda function, things should work without running into the CORS issue.