Created
June 25, 2020 10:06
-
-
Save velotiotech/c3cc131e34894fe7aba8211c554cadc6 to your computer and use it in GitHub Desktop.
Create namespace in KV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/storage/kv/namespaces" \ | |
-X POST \ | |
-H "X-Auth-Email: $CLOUDFLARE_EMAIL" \ | |
-H "X-Auth-Key: $CLOUDFLARE_AUTH_KEY" \ | |
-H "Content-Type: application/json" \ | |
--data '{"title": "Requests"}' | |
The above HTTP request will create a namespace by the name Requests. The response should look something like this: | |
{ | |
"result": { | |
"id": "30b52f55aafb41d88546d01d5f69440a", | |
"title": "Requests", | |
"supports_url_encoding": true | |
}, | |
"success": true, | |
"errors": [], | |
"messages": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment