curl --request POST \
--url https://dns-api.edisglobal.com/set/ptr \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data signature=session_signature_12345 \
--data kvm_id=kvm_123456_789012 \
--data valid_until=1737476000 \
--data api_host=api_host.edisglobal.com \
--data 'ip={
"192.168.1.1": "hostname.example.com",
"192.168.1.2": "another-host.example.com"
}'import requests
url = "https://dns-api.edisglobal.com/set/ptr"
payload = {
"signature": "session_signature_12345",
"kvm_id": "kvm_123456_789012",
"valid_until": "1737476000",
"api_host": "api_host.edisglobal.com",
"ip": "{
\"192.168.1.1\": \"hostname.example.com\",
\"192.168.1.2\": \"another-host.example.com\"
}"
}
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_123456_789012',
valid_until: '1737476000',
api_host: 'api_host.edisglobal.com',
ip: '{\n "192.168.1.1": "hostname.example.com",\n "192.168.1.2": "another-host.example.com"\n}'
})
};
fetch('https://dns-api.edisglobal.com/set/ptr', 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://dns-api.edisglobal.com/set/ptr",
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_123456_789012&valid_until=1737476000&api_host=api_host.edisglobal.com&ip=%7B%0A%20%20%22192.168.1.1%22%3A%20%22hostname.example.com%22%2C%0A%20%20%22192.168.1.2%22%3A%20%22another-host.example.com%22%0A%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://dns-api.edisglobal.com/set/ptr"
payload := strings.NewReader("signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&api_host=api_host.edisglobal.com&ip=%7B%0A%20%20%22192.168.1.1%22%3A%20%22hostname.example.com%22%2C%0A%20%20%22192.168.1.2%22%3A%20%22another-host.example.com%22%0A%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://dns-api.edisglobal.com/set/ptr")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&api_host=api_host.edisglobal.com&ip=%7B%0A%20%20%22192.168.1.1%22%3A%20%22hostname.example.com%22%2C%0A%20%20%22192.168.1.2%22%3A%20%22another-host.example.com%22%0A%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://dns-api.edisglobal.com/set/ptr")
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_123456_789012&valid_until=1737476000&api_host=api_host.edisglobal.com&ip=%7B%0A%20%20%22192.168.1.1%22%3A%20%22hostname.example.com%22%2C%0A%20%20%22192.168.1.2%22%3A%20%22another-host.example.com%22%0A%7D"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "PTR records set successfully."
}{
"status": "error",
"error": "Invalid IP address format."
}{
"status": "error",
"error": "Session expired."
}{
"status": "error",
"error": "Unexpected server error."
}Set PTR
This endpoint sets PTR (Reverse DNS) records for specified IP addresses.
The api_host parameter, obtained from the “Create AUTH-session” response,
is dynamically set in the URL.
Provide the signature, kvm_id, valid_until, and a JSON-encoded object of IP addresses and their associated hostnames to set PTR records.
curl --request POST \
--url https://dns-api.edisglobal.com/set/ptr \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data signature=session_signature_12345 \
--data kvm_id=kvm_123456_789012 \
--data valid_until=1737476000 \
--data api_host=api_host.edisglobal.com \
--data 'ip={
"192.168.1.1": "hostname.example.com",
"192.168.1.2": "another-host.example.com"
}'import requests
url = "https://dns-api.edisglobal.com/set/ptr"
payload = {
"signature": "session_signature_12345",
"kvm_id": "kvm_123456_789012",
"valid_until": "1737476000",
"api_host": "api_host.edisglobal.com",
"ip": "{
\"192.168.1.1\": \"hostname.example.com\",
\"192.168.1.2\": \"another-host.example.com\"
}"
}
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_123456_789012',
valid_until: '1737476000',
api_host: 'api_host.edisglobal.com',
ip: '{\n "192.168.1.1": "hostname.example.com",\n "192.168.1.2": "another-host.example.com"\n}'
})
};
fetch('https://dns-api.edisglobal.com/set/ptr', 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://dns-api.edisglobal.com/set/ptr",
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_123456_789012&valid_until=1737476000&api_host=api_host.edisglobal.com&ip=%7B%0A%20%20%22192.168.1.1%22%3A%20%22hostname.example.com%22%2C%0A%20%20%22192.168.1.2%22%3A%20%22another-host.example.com%22%0A%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://dns-api.edisglobal.com/set/ptr"
payload := strings.NewReader("signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&api_host=api_host.edisglobal.com&ip=%7B%0A%20%20%22192.168.1.1%22%3A%20%22hostname.example.com%22%2C%0A%20%20%22192.168.1.2%22%3A%20%22another-host.example.com%22%0A%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://dns-api.edisglobal.com/set/ptr")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&api_host=api_host.edisglobal.com&ip=%7B%0A%20%20%22192.168.1.1%22%3A%20%22hostname.example.com%22%2C%0A%20%20%22192.168.1.2%22%3A%20%22another-host.example.com%22%0A%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://dns-api.edisglobal.com/set/ptr")
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_123456_789012&valid_until=1737476000&api_host=api_host.edisglobal.com&ip=%7B%0A%20%20%22192.168.1.1%22%3A%20%22hostname.example.com%22%2C%0A%20%20%22192.168.1.2%22%3A%20%22another-host.example.com%22%0A%7D"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "PTR records set successfully."
}{
"status": "error",
"error": "Invalid IP address format."
}{
"status": "error",
"error": "Session expired."
}{
"status": "error",
"error": "Unexpected server error."
}Body
Required parameters to set PTR records.
The session signature obtained from the "Create AUTH-session" call.
"session_signature_12345"
The unique identifier of the KVM to set PTR records for.
"kvm_123456_789012"
The expiration timestamp of the session obtained from the "Create AUTH-session" call.
"1737476000"
The API host URL obtained from the "Create AUTH-session" call.
"api_host.edisglobal.com"
A JSON-encoded object of IP addresses and their associated hostnames.
Show child attributes
Show child attributes
{ "192.168.1.1": "hostname.example.com", "192.168.1.2": "another-host.example.com" }
Was this page helpful?