Is there a way to programmatically manage worker routes? e.g. without having to redeploy workers?
For our application we need be able to manage worker routes via an API, is that possible?
3 Replies
Yup. The docs are at https://developers.cloudflare.com/api/operations/worker-routes-create-route
Cloudflare API Documentation
Interact with Cloudflare's products and services via the Cloudflare API
Yeah I found that as well. I'm a bit confused on the difference between https://developers.cloudflare.com/api/operations/worker-routes-create-route and https://developers.cloudflare.com/api/operations/worker-environment-put-script-content, the latter being what the dashboard itself seems to be using
You want create route. Put script is uploading the worker code