How to know if the deployment on Netlify is done via API?

82 views Asked by At

I successfully deployed a site from my web app using Netlify API, but I don’t know how to get the info that if the deployment is done or not.

I thought the response from get-deploy can be the answer, especially the summary.status of that response.

I tried to keep calling the /api/v1/sites/:site_id/deploys/:deploy_id endpoint every 5 sec and watching summary.status, however, the value of summary.status has never changed from building even after the deployment has been done.

API response

How can I get this kind of data?

Thank you.

1

There are 1 answers

1
Taishi Kato On BEST ANSWER

Calling the /api/v1/sites/:site_id/deploys/:deploy_id endpoint is the right way to do it, they say.