Domain DNS Records
curl --request GET \
--url https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/dnsimport requests
url = "https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/dns"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/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}/domains/{domain_id}/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}/domains/{domain_id}/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}/domains/{domain_id}/dns")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/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"
},
{
"type": "TXT",
"name": "_acme-challenge.example.com",
"value": "v111d4af8cd74272a284831fbae14a8v",
"status": "pending"
}
]
}
Domains
Domain DNS Records
Returns the DNS records to create at your DNS provider so a custom domain validates and gets its HTTPS certificate.
GET
/
v1
/
apps
/
{id}
/
domains
/
{domain_id}
/
dns
Domain DNS Records
curl --request GET \
--url https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/dnsimport requests
url = "https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/dns"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/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}/domains/{domain_id}/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}/domains/{domain_id}/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}/domains/{domain_id}/dns")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/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"
},
{
"type": "TXT",
"name": "_acme-challenge.example.com",
"value": "v111d4af8cd74272a284831fbae14a8v",
"status": "pending"
}
]
}
Returns the records you create at the domain’s DNS provider: a
CNAME that points the hostname at Vertra Cloud, plus the
records that validate ownership and issue the HTTPS certificate. Each record carries its own status, so you can see
which ones are already resolving. Calling this route also refreshes the domain’s status and ssl_status. Requires the
apps:read scope when called with an API key.
string
required
The application ID.
string
required
The domain ID, from List Application Domains.
string
If the application belongs to a workspace, the workspace’s ID. Required for workspace members acting on an application they don’t own.
Response
APIApplicationDomainDnsRecord[]
{
"response": [
{
"type": "CNAME",
"name": "example.com",
"value": "cname.vertraweb.app",
"status": "pending"
},
{
"type": "TXT",
"name": "_acme-challenge.example.com",
"value": "v111d4af8cd74272a284831fbae14a8v",
"status": "pending"
}
]
}
Create every record exactly as returned, and remove any other
A, AAAA or CNAME record with the same name first.
A root domain (apex: true) needs a DNS provider that supports CNAME at the root. See the
custom domains guide. When the domain is removed, delete these records at your DNS provider
too, as explained in Remove Application Domain.Error Responses
string
The error code indicating the reason for the failure. Possible values:
VALIDATION_ERROR: The path parameters 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 read the application (403).API_KEY_SCOPE_DENIED: The API key does not have theapps:readscope (403).APP_NOT_FOUND: The specified application does not exist (404).DOMAIN_NOT_FOUND: The application has no domain with that ID (404).CUSTOM_DOMAIN_RECORD_NOT_FOUND: The domain’s DNS records are not available (404). Retry in a few minutes; if it persists, remove the domain and add it again.RATE_LIMIT_EXCEEDED: The route’s budget was reached (429).INTERNAL_SERVER_ERROR: Unexpected failure (500).
{
"code": "DOMAIN_NOT_FOUND"
}
{
"code": "CUSTOM_DOMAIN_RECORD_NOT_FOUND"
}
This route has its own budget of 10 requests per minute. See Rate Limiting.