`cloudflare does not support bulk writes from within a worker` but you can do bulk put with cli or

cloudflare does not support bulk writes from within a worker


but you can do bulk put with cli or API:
You can write more than one key-value pair at a time with Wrangler or via the API
. The bulk API can accept up to 10,000 KV pairs at once

so whats stopping me from putting my cf api key into worker env variable and and using api inside the worker? like this:

curl --request PUT \
  --url https://api.cloudflare.com/client/v4/accounts/account_identifier/storage/kv/namespaces/namespace_identifier/bulk \
  --header 'Authorization: Bearer undefined' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "base64": false,
    "expiration": 1578435000,
    "expiration_ttl": 300,
    "key": "My-Key",
    "metadata": {
      "someMetadataKey": "someMetadataValue"
    },
    "value": "Some string"
  },
...//more objects for bulk put
]'

will i get banned if i do this?
Was this page helpful?