curl --request POST \
--url https://{api_host}/kvm/v2/set/autohydration_enable \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data signature=session_signature_12345 \
--data kvm_id=kvm_xxxxx_yyyyy \
--data valid_until=1737476000 \
--data 'config={"auto_hydration":300}'import requests
url = "https://{api_host}/kvm/v2/set/autohydration_enable"
payload = {
"signature": "session_signature_12345",
"kvm_id": "kvm_xxxxx_yyyyy",
"valid_until": "1737476000",
"config": "{\"auto_hydration\":300}"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
signature: 'session_signature_12345',
kvm_id: 'kvm_xxxxx_yyyyy',
valid_until: '1737476000',
config: '{"auto_hydration":300}'
})
};
fetch('https://{api_host}/kvm/v2/set/autohydration_enable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api_host}/kvm/v2/set/autohydration_enable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000&config=%7B%22auto_hydration%22%3A300%7D",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{api_host}/kvm/v2/set/autohydration_enable"
payload := strings.NewReader("signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000&config=%7B%22auto_hydration%22%3A300%7D")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{api_host}/kvm/v2/set/autohydration_enable")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000&config=%7B%22auto_hydration%22%3A300%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_host}/kvm/v2/set/autohydration_enable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000&config=%7B%22auto_hydration%22%3A300%7D"
response = http.request(request)
puts response.read_body{
"status": "success"
}{
"error": "Invalid parameters provided"
}{
"error": "Invalid session"
}{
"error": "Internal server error"
}Enable Auto-Hydration
This endpoint enables Auto-Hydration for a specified KVM VPS. Select an automatic assignment increment of 100, 200, 300, or 500 GB. When the VPS reaches 99% of its current traffic allowance, the selected amount is assigned from the existing Traffic Pool balance. Auto-Hydration does not purchase traffic, and no assignment occurs if the Pool balance is insufficient.
Use the api_host from the ‘Create AUTH-session’ response to authenticate.
Required parameters:
signature: The session signature obtained from the ‘Create AUTH-session’ call.kvm_id: The unique identifier of the KVM VPS.valid_until: The expiration timestamp for the session.config: A JSON object containing one supported Auto-Hydration value.
Example using a 300 GB increment:
{"auto_hydration":300}
curl --request POST \
--url https://{api_host}/kvm/v2/set/autohydration_enable \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data signature=session_signature_12345 \
--data kvm_id=kvm_xxxxx_yyyyy \
--data valid_until=1737476000 \
--data 'config={"auto_hydration":300}'import requests
url = "https://{api_host}/kvm/v2/set/autohydration_enable"
payload = {
"signature": "session_signature_12345",
"kvm_id": "kvm_xxxxx_yyyyy",
"valid_until": "1737476000",
"config": "{\"auto_hydration\":300}"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
signature: 'session_signature_12345',
kvm_id: 'kvm_xxxxx_yyyyy',
valid_until: '1737476000',
config: '{"auto_hydration":300}'
})
};
fetch('https://{api_host}/kvm/v2/set/autohydration_enable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api_host}/kvm/v2/set/autohydration_enable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000&config=%7B%22auto_hydration%22%3A300%7D",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{api_host}/kvm/v2/set/autohydration_enable"
payload := strings.NewReader("signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000&config=%7B%22auto_hydration%22%3A300%7D")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{api_host}/kvm/v2/set/autohydration_enable")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000&config=%7B%22auto_hydration%22%3A300%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_host}/kvm/v2/set/autohydration_enable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000&config=%7B%22auto_hydration%22%3A300%7D"
response = http.request(request)
puts response.read_body{
"status": "success"
}{
"error": "Invalid parameters provided"
}{
"error": "Invalid session"
}{
"error": "Internal server error"
}Body
Parameters required to enable auto hydration for a KVM VPS.
The session signature obtained from the 'Create AUTH-session' call.
"session_signature_12345"
The unique identifier of the KVM VPS.
"kvm_xxxxx_yyyyy"
The expiration timestamp for the session, obtained from the 'Create AUTH-session' call.
"1737476000"
JSON object containing the Auto-Hydration configuration. Supported values are 100, 200, 300, and 500, representing the traffic assignment increment in GB.
Example: {"auto_hydration":300}
"{\"auto_hydration\":300}"
Response
Auto hydration enabled successfully.
"success"
Was this page helpful?