Rollback via API
I want to deploy a new version of the worker however i need to be able to roll it back, is there anyway to get the current deployed version via the API, so i can do a deploy based that version
e.g.
1. Get Current Version
2. PUT /scrips/scriptname (to push the new content)
3. (something else errors deploy version from step 1)
1 Reply
You can pull the versions: https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/versions/
Grab the latest, do your update
Then if an issue exists, do a new deployment https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/deployments/methods/create/ with the old version