Workers KV UI change

I’ve previously used the edge cache example on Github (https://github.com/cloudflare/worker-examples/tree/master/examples/edge-cache-html) but the UI has recently changed and now I can’t work out how to bind the Namespace into the Worker. Does anyone know?

Which client are you using to load the Worker?
wrangler
Terraform
Serverless
No client

Sorry, that was a bit vague. I meant in the web interface, but I’ve found it now. Also confirmed the binding using the API via curl, but couldn’t find a way in the documentation to add one vie the API. Anyway, I’ve found what I was looking for in the web interface now.

1 Like

Hi @riklewis, I’m on the Workers team. Sorry that binding namespaces in the UI was not super clear. Would you mind providing us with more details as to what was confusing or unclear?

You can also feel free to email me at [email protected].

1 Like

It’s not confusing at all, it’s clear as day, no idea how I missed it. I guess it’s just because before it was a third tab at the top, and now it’s a second tab under the “Scripts” tab, so it wasn’t where I was looking for it. But if I came to it fresh without my preconceptions, I’m sure I’d have found it straight away.

2 Likes

Ah okay, got it. That’s helpful feedback. Thank you!

Yeah, right now it’s very confusing, two tabs for same thing

Is there any way to add or remove the bindings for the workers KV via API?

I’ve found the documentation here for doing this via the web interface, and this deprecated documentation shows how to do it using an older API, but I have not been able to find up-to-date documentation.

I don’t know where the substitute is indicated, it’s not in the api.cloudflare.com page… @sklabnik can you help us out here?

1 Like

There’s some discussion about the “deprecated” thing here; one set says they are, one set says they’re not. You should feel free to use that deprecated API for now, and I’ve created some tickets to look into things. Sorry about that!

3 Likes

You can also use wrangler to deploy workers AND bindings. :slight_smile:

It seems like CF has not created all the documentation for the new API. I stumbled across this endpoint which doesn’t seem to be documented anywhere. However, it lines up with their newer architecture so I’m guessing it is part of the new UI.

https://api.cloudflare.com/client/v4/accounts/:account_id/workers/scripts/:script_name/bindings