Get a domain by name
curl --request GET \
--url https://api.cpln.io/org/{org}/domain/{name} \
--header 'Authorization: <api-key>'import requests
url = "https://api.cpln.io/org/{org}/domain/{name}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.cpln.io/org/{org}/domain/{name}', 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.cpln.io/org/{org}/domain/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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.cpln.io/org/{org}/domain/{name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.cpln.io/org/{org}/domain/{name}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cpln.io/org/{org}/domain/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"kind": "<string>",
"version": 123,
"description": "<string>",
"tags": {},
"created": "2023-11-07T05:31:56Z",
"lastModified": "2023-11-07T05:31:56Z",
"links": [
{
"rel": "<string>",
"href": "<string>"
}
],
"name": "<string>",
"spec": {
"gvcLink": "<string>",
"workloadLink": "<string>",
"acceptAllHosts": true,
"acceptAllSubdomains": true,
"ports": [
{
"number": 123,
"protocol": "http2",
"routes": [
{
"replacePrefix": "<string>",
"regex": "<string>",
"prefix": "<string>",
"workloadLink": "<string>",
"port": 123,
"hostPrefix": "<string>",
"hostRegex": "<string>",
"headers": {
"request": {
"set": {}
}
},
"replica": 123,
"mirror": [
{
"workloadLink": "<string>",
"port": 123,
"percent": 123
}
],
"canaries": [
{
"workloadLink": "<string>",
"port": 123,
"weight": 123
}
]
}
],
"cors": {
"allowOrigins": [
{
"exact": "<string>",
"regex": "<string>"
}
],
"allowMethods": [
"<string>"
],
"allowHeaders": [
"<string>"
],
"exposeHeaders": [
"<string>"
],
"maxAge": "<string>",
"allowCredentials": true
},
"tls": {
"minProtocolVersion": "TLSV1_2",
"cipherSuites": [
[
"ECDHE-ECDSA-AES256-GCM-SHA384",
"ECDHE-ECDSA-CHACHA20-POLY1305",
"ECDHE-ECDSA-AES128-GCM-SHA256",
"ECDHE-RSA-AES256-GCM-SHA384",
"ECDHE-RSA-CHACHA20-POLY1305",
"ECDHE-RSA-AES128-GCM-SHA256",
"AES256-GCM-SHA384",
"AES128-GCM-SHA256"
]
],
"clientCertificate": {
"secretLink": "<string>"
},
"serverCertificate": {
"secretLink": "<string>"
}
}
}
]
},
"status": {
"endpoints": [
{
"url": "<string>",
"workloadLink": "<string>"
}
],
"warning": "<string>",
"statusUpdated": "2023-11-07T05:31:56Z",
"locations": [
{
"name": "<string>"
}
],
"fingerprint": "<string>",
"dnsConfig": [
{
"type": "<string>",
"ttl": 123,
"host": "<string>",
"value": "<string>"
}
]
}
}{
"status": 123,
"message": "<string>",
"code": "<string>",
"details": {},
"id": "<string>"
}Domain
Get a domain by name
Response will contain the requested domain if the caller is authorized to view it
GET
/
org
/
{org}
/
domain
/
{name}
Get a domain by name
curl --request GET \
--url https://api.cpln.io/org/{org}/domain/{name} \
--header 'Authorization: <api-key>'import requests
url = "https://api.cpln.io/org/{org}/domain/{name}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.cpln.io/org/{org}/domain/{name}', 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.cpln.io/org/{org}/domain/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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.cpln.io/org/{org}/domain/{name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.cpln.io/org/{org}/domain/{name}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cpln.io/org/{org}/domain/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"kind": "<string>",
"version": 123,
"description": "<string>",
"tags": {},
"created": "2023-11-07T05:31:56Z",
"lastModified": "2023-11-07T05:31:56Z",
"links": [
{
"rel": "<string>",
"href": "<string>"
}
],
"name": "<string>",
"spec": {
"gvcLink": "<string>",
"workloadLink": "<string>",
"acceptAllHosts": true,
"acceptAllSubdomains": true,
"ports": [
{
"number": 123,
"protocol": "http2",
"routes": [
{
"replacePrefix": "<string>",
"regex": "<string>",
"prefix": "<string>",
"workloadLink": "<string>",
"port": 123,
"hostPrefix": "<string>",
"hostRegex": "<string>",
"headers": {
"request": {
"set": {}
}
},
"replica": 123,
"mirror": [
{
"workloadLink": "<string>",
"port": 123,
"percent": 123
}
],
"canaries": [
{
"workloadLink": "<string>",
"port": 123,
"weight": 123
}
]
}
],
"cors": {
"allowOrigins": [
{
"exact": "<string>",
"regex": "<string>"
}
],
"allowMethods": [
"<string>"
],
"allowHeaders": [
"<string>"
],
"exposeHeaders": [
"<string>"
],
"maxAge": "<string>",
"allowCredentials": true
},
"tls": {
"minProtocolVersion": "TLSV1_2",
"cipherSuites": [
[
"ECDHE-ECDSA-AES256-GCM-SHA384",
"ECDHE-ECDSA-CHACHA20-POLY1305",
"ECDHE-ECDSA-AES128-GCM-SHA256",
"ECDHE-RSA-AES256-GCM-SHA384",
"ECDHE-RSA-CHACHA20-POLY1305",
"ECDHE-RSA-AES128-GCM-SHA256",
"AES256-GCM-SHA384",
"AES128-GCM-SHA256"
]
],
"clientCertificate": {
"secretLink": "<string>"
},
"serverCertificate": {
"secretLink": "<string>"
}
}
}
]
},
"status": {
"endpoints": [
{
"url": "<string>",
"workloadLink": "<string>"
}
],
"warning": "<string>",
"statusUpdated": "2023-11-07T05:31:56Z",
"locations": [
{
"name": "<string>"
}
],
"fingerprint": "<string>",
"dnsConfig": [
{
"type": "<string>",
"ttl": 123,
"host": "<string>",
"value": "<string>"
}
]
}
}{
"status": 123,
"message": "<string>",
"code": "<string>",
"details": {},
"id": "<string>"
}Authorizations
serviceAccountKeyjwt
Service account key can be used as API keys
Response
Success
Maximum string length:
250Show child attributes
Show child attributes
Maximum string length:
253Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I