Last active
January 10, 2020 06:42
-
-
Save farkaskid/7406da9090780b0ef1849e842432f67a 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