No option to retry build for cloudflare workers through API

For Workers & Pages, what is the name of the domain?

N/A

What is the error number?

N/A

What is the error message?

No option to retry build for cloudflare workers

What is the issue or error you’re encountering

I am trying to retry build for cloudflare worker deployment through API, while cloudflare pages does have this retry API endpoint but workers don’t have! Anyone here who can give more insights on how we can retry deployment for workers through API?

Hello!

@Walshy shared this with me. Let us know if it does what you need.

curl 'https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/builds/triggers/$TRIGGER_ID/builds' \
  -H 'content-type: application/json' \
  -X POST \
  -d '{"branch":"main","commit_hash":"<COMMIT_HASH>"}'
1 Like

Thanks for the update, what about getting the latest commit hash? i mean to do retry build, we need to know commit_hash, we need to get it through github API? or it is possible on cloudflare too.

This topic was automatically closed after 15 days. New replies are no longer allowed.