Api to Add or Update D1 Bindings in Workers ?
Is there any API to Add new D1 Bindings or update existing one on a Cloudflare workers
Or is there any Cloudflare SDK ?
3 Replies
Bindings between workers are controlled by wrangler config or in some cases the dashboard
https://developers.cloudflare.com/workers/runtime-apis/bindings/
Is it possible to update via worker code ?
Cloudflare Docs
Bindings (env) · Cloudflare Workers docs
Worker Bindings that allow for interaction with other Cloudflare Resources.
You can do it with the REST API
https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/script_and_version_settings/methods/edit/
Cloudflare API | Workers › Scripts › Script And Version Setting...
Interact with Cloudflare's products and services via the Cloudflare API