Workers KV Namespace
Write multiple key-value pairs
Changed onWrite multiple keys and values at once. Body should be an array of up to 10,000 key-value pairs to be stored, along with optional expiration information. Existing values and expirations will be overwritten. If neither expiration nor expiration_ttl is specified, the key-value pair will never expire. If both are set, expiration_ttl is used and expiration is ignored. The entire request size must be 100 megabytes or less.
put/storage/kv/namespaces/{namespace_id}/bulk
Request
- Base URL: /cdn-cgi/local/explorer/api (relative, and the document was published on a file host, not at the API’s origin)
- URL: /cdn-cgi/local/explorer/api/storage/kv/namespaces/{namespace_id}/bulk
- Auth: none declared
Path parameters
namespace_idstring required
Namespace identifier tag.
Example:0f2ac74b498b48028cb68387c421e279
Request body
Example request
[
{
"expiration": 1578435000,
"expiration_ttl": 300,
"key": "My-Key",
"metadata": {
"someMetadataKey": "someMetadataValue"
},
"value": "Some string"
}
]Response
Write multiple key-value pairs response.
Example response
{
"errors": [],
"messages": [],
"success": true,
"result": {
"successful_key_count": 100
}
}Changes
- ○
endpoint added
- ○