Update zone SOA settings
PATCH
/
cloud-dns
/
zone
Update zone SOA settings
curl --request PATCH \
--url https://api.aptranet.com/cloud-dns/zone \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostmaster_email": "jsmith@example.com",
"nx_ttl": 1,
"refresh": 1,
"retry": 1
}
'import requests
url = "https://api.aptranet.com/cloud-dns/zone"
payload = {
"hostmaster_email": "jsmith@example.com",
"nx_ttl": 1,
"refresh": 1,
"retry": 1
}
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Aptranet-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({hostmaster_email: 'jsmith@example.com', nx_ttl: 1, refresh: 1, retry: 1})
};
fetch('https://api.aptranet.com/cloud-dns/zone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-dns/zone"
payload := strings.NewReader("{\n \"hostmaster_email\": \"jsmith@example.com\",\n \"nx_ttl\": 1,\n \"refresh\": 1,\n \"retry\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}Authorizations
Access key beginning with APTRANET_.
Current secret paired with the access key.
Query Parameters
DNS zone identifier.
Required range:
x >= 1Body
application/json
Response
Zone SOA settings updated.
Update zone SOA settings
curl --request PATCH \
--url https://api.aptranet.com/cloud-dns/zone \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostmaster_email": "jsmith@example.com",
"nx_ttl": 1,
"refresh": 1,
"retry": 1
}
'import requests
url = "https://api.aptranet.com/cloud-dns/zone"
payload = {
"hostmaster_email": "jsmith@example.com",
"nx_ttl": 1,
"refresh": 1,
"retry": 1
}
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Aptranet-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({hostmaster_email: 'jsmith@example.com', nx_ttl: 1, refresh: 1, retry: 1})
};
fetch('https://api.aptranet.com/cloud-dns/zone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-dns/zone"
payload := strings.NewReader("{\n \"hostmaster_email\": \"jsmith@example.com\",\n \"nx_ttl\": 1,\n \"refresh\": 1,\n \"retry\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}