Hey,

Hey, We're using the workers for platforms, and I want to monitor the number of Workers for Platforms Scripts (I have this section in our bill). Can you please recommend the best practice for that? I'm playing with the Graphql api, but cannot really find the best match to count the number of scripts (we have our users creating many of workers, and I want to be able to monitor that) Thanks!
5 Replies
Beny
Beny5mo ago
https://dash.cloudflare.com/api/v4/accounts/:account_id/workers/dispatch/namespaced_script_count
https://dash.cloudflare.com/api/v4/accounts/:account_id/workers/dispatch/namespaced_script_count
Thats how the Dash gets your count
yaniv.efraim
yaniv.efraimOP5mo ago
cool, thanks. Does it work with Graphql api as well? also, I see that it doesn't have any filters. I assume it's something like last 5 days? (As is in the dashboard?) oh, I see that it's the toatl amount of workers, sorry We keep deleting workers, but we are charged by total created workers, right? Is there a way to track this, using your APIs?
yaniv.efraim
yaniv.efraimOP5mo ago
No description
Beny
Beny5mo ago
I had a look but it doesn't seem like you're going to be able to get that data on the fly, there's nothing documented, in GraphQL or the Dashboard surrounding that metric You would need to do your own way of tracking that I imagine
yaniv.efraim
yaniv.efraimOP5mo ago
ok, thank you very much
Want results from more Discord servers?
Add your server