Why would your route update? I use that API endpoint heavily and it just replaces an old script with a new one with the same name. The route doesn’t change, so it just executes the new version of my Worker.
The Endpoint also works to upload a brand new script to a brand new name, but it does not handle routes.
I don’t know why the new worker wouldn’t work. As I said, I use this extensively, and the content updates immediately with no need to access the dashboard for a Save & Deploy.
If you feel the Worker isn’t updating properly, I suggest you contact Support and see if they have any suggestions.
To contact Cloudflare Customer Support, login & go to https://dash.cloudflare.com/?account=support and select get more help. If you receive an automatic response that does not help you, please reply and indicate you need more help.
I’m not so sure about that. As I said with an existing Worker using a set Route, any time I PUT new code for an existing Worker, it takes effect immediately.
I can’t find that POST “enable” in the API docs. Can you post a link to it so I can take a look?
But I guarantee you this is the exact POST call made when you click on the deploy button in the Cloudflare Dashboard. You can verify this using Chrome DevTools.
I had the same problem before. Using this POST call led the new version my worker to be accessible. It is 100% mandatory to deploy after upload when you are using the upload API, then want to try your new worker version. You have to deploy it first, either by call or the deploy button in the API.
Note that currently I left the Upload/Deploy APIs and I’m now using Wrangler, because I have also KV bindings and a single Wrangler command makes it simpler to manage all these APIs together.