Custom Domain DNS Records
curl --request GET \
--url https://api.vertracloud.app/v1/apps/{id}/network/dnsimport requests
url = "https://api.vertracloud.app/v1/apps/{id}/network/dns"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vertracloud.app/v1/apps/{id}/network/dns', 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.vertracloud.app/v1/apps/{id}/network/dns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/apps/{id}/network/dns"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vertracloud.app/v1/apps/{id}/network/dns")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/network/dns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"response": [
{
"type": "CNAME",
"name": "example.com",
"value": "cname.vertraweb.app",
"status": "pending_validation"
},
{
"type": "TXT",
"name": "_acme-challenge.example.com",
"value": "v111d4af8cd74272a284831fbae14a8v",
"status": "pending_validation"
}
]
}
Network
Custom Domain DNS Records
Retrieves the DNS records required for configuring a custom domain for an application.
GET
/
v1
/
apps
/
{id}
/
network
/
dns
Custom Domain DNS Records
curl --request GET \
--url https://api.vertracloud.app/v1/apps/{id}/network/dnsimport requests
url = "https://api.vertracloud.app/v1/apps/{id}/network/dns"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vertracloud.app/v1/apps/{id}/network/dns', 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.vertracloud.app/v1/apps/{id}/network/dns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/apps/{id}/network/dns"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vertracloud.app/v1/apps/{id}/network/dns")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/network/dns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"response": [
{
"type": "CNAME",
"name": "example.com",
"value": "cname.vertraweb.app",
"status": "pending_validation"
},
{
"type": "TXT",
"name": "_acme-challenge.example.com",
"value": "v111d4af8cd74272a284831fbae14a8v",
"status": "pending_validation"
}
]
}
string
required
The ID of the application to retrieve DNS records for.
Response
array
An array of DNS record objects required for the custom domain.
Show Toggle object
Show Toggle object
string
The type of DNS record (
CNAME or TXT).string
The name of the DNS record (e.g.,
example.com or _acme-challenge.example.com).string | null
The value to set for the DNS record. For TXT records, this is
null if the record is already validated.string
The status of the DNS record (
active or pending_validation).{
"response": [
{
"type": "CNAME",
"name": "example.com",
"value": "cname.vertraweb.app",
"status": "pending_validation"
},
{
"type": "TXT",
"name": "_acme-challenge.example.com",
"value": "v111d4af8cd74272a284831fbae14a8v",
"status": "pending_validation"
}
]
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
VALIDATION_ERROR: The path parameter failed validation (400). The response also carriesmessageandpath.UNAUTHORIZED: The request is not authenticated (401).USER_NOT_FOUND: The authenticated user could not be resolved (401).ACCESS_DENIED: The user does not have permission to act on the application (403).APP_NOT_FOUND: The specified application does not exist (404).NO_CUSTOM_DOMAIN: The application does not have a custom domain configured (404).CUSTOM_DOMAIN_RECORD_NOT_FOUND: The domain’s DNS records could not be read yet; retry in a few minutes (404).INTERNAL_SERVER_ERROR: Unexpected failure (500).
string
A descriptive message providing additional details about the error.
{
"code": "UNAUTHORIZED"
}
{
"code": "APP_NOT_FOUND"
}
{
"code": "NO_CUSTOM_DOMAIN"
}
Attach the domain first with
Attach Custom Domain — without one this route
answers
NO_CUSTOM_DOMAIN.This route has its own budget of 10 requests per minute. See Rate Limiting.