/kv/rest/v1/sets/bulk REST API Endpoint
Body Parameters
addSets
object
Loading...
deleteSets
array
Loading...
Returns
code
number
Loading...
msg
string
Loading...
data
null
Loading...
Request
curl -X POST \
"https://api.quicknode.com/kv/rest/v1/sets/bulk" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d $'{
"addSets": {
"key1": "value1",
"key2": "value2"
},
"deleteSets": [
"key3"
]
}'
var myHeaders = new Headers();
myHeaders.append('accept', 'application/json');
myHeaders.append('Content-Type', 'application/json');
myHeaders.append('x-api-key', 'YOUR_API_KEY'); // Replace with your actual API key
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow',
body: JSON.stringify({
addSets: {
key1: 'value1',
key2: 'value2'
},
deleteSets: ['key3']
})
};
fetch('https://api.quicknode.com/kv/rest/v1/sets/bulk', requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
url = "https://api.quicknode.com/kv/rest/v1/sets/bulk"
payload = {
"addSets": {
"key_1": "value_1",
"key_2": "value_2"
},
"deleteSets": ["key_3"]
}
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY" # Replace with your actual API key
}
response = requests.post(url, headers=headers, json=payload)
print(response.text)
require "uri"
require "net/http"
require "json"
# Set up the URL for the request
url = URI("https://api.quicknode.com/kv/rest/v1/sets/bulk")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["Content-Type"] = "application/json"
request["x-api-key"] = "YOUR_API_KEY" # Replace with your actual API key
request.body = {
"addSets" => {
"key_1" => "value_1",
"key_2" => "value_2"
},
"deleteSets" => [
"key_3"
]
}.to_json
response = https.request(request)
puts response.body
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free