Check a web app before adding it to Cloud Defender
curl --request POST \
--url https://app.aegister.com/api/v1/cloud-defender/precheck \
--header 'Content-Type: application/json' \
--header 'X-Aegister-Token: <api-key>' \
--data '
{
"organization": 12,
"fqdn": "www.example.com",
"endpoint": "203.0.113.20"
}
'import requests
url = "https://app.aegister.com/api/v1/cloud-defender/precheck"
payload = {
"organization": 12,
"fqdn": "www.example.com",
"endpoint": "203.0.113.20"
}
headers = {
"X-Aegister-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Aegister-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({organization: 12, fqdn: 'www.example.com', endpoint: '203.0.113.20'})
};
fetch('https://app.aegister.com/api/v1/cloud-defender/precheck', 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://app.aegister.com/api/v1/cloud-defender/precheck",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'organization' => 12,
'fqdn' => 'www.example.com',
'endpoint' => '203.0.113.20'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Aegister-Token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.aegister.com/api/v1/cloud-defender/precheck"
payload := strings.NewReader("{\n \"organization\": 12,\n \"fqdn\": \"www.example.com\",\n \"endpoint\": \"203.0.113.20\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Aegister-Token", "<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))
}HttpResponse<String> response = Unirest.post("https://app.aegister.com/api/v1/cloud-defender/precheck")
.header("X-Aegister-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"organization\": 12,\n \"fqdn\": \"www.example.com\",\n \"endpoint\": \"203.0.113.20\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aegister.com/api/v1/cloud-defender/precheck")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Aegister-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"organization\": 12,\n \"fqdn\": \"www.example.com\",\n \"endpoint\": \"203.0.113.20\"\n}"
response = http.request(request)
puts response.read_body{
"error": 0,
"messages": [],
"data": {
"domain": {
"addresses": [
"203.0.113.20"
],
"public": true,
"status": 200,
"protected": false
},
"origin": {
"addresses": [
"203.0.113.20"
],
"public": true,
"status": 200,
"certificate": "valid"
},
"registered": false
}
}{
"error": 1,
"messages": [
"Invalid data provided"
]
}{
"error": 1,
"messages": []
}Devices
Check a web app before adding it to Cloud Defender
Check a web app before you add it: whether the domain resolves and already answers through Cloud Defender, whether your origin answers HTTPS for the domain and with which certificate, and whether the domain is already added. It is the check the setup wizard runs. Only public addresses are fetched.
POST
/
api
/
v1
/
cloud-defender
/
precheck
Check a web app before adding it to Cloud Defender
curl --request POST \
--url https://app.aegister.com/api/v1/cloud-defender/precheck \
--header 'Content-Type: application/json' \
--header 'X-Aegister-Token: <api-key>' \
--data '
{
"organization": 12,
"fqdn": "www.example.com",
"endpoint": "203.0.113.20"
}
'import requests
url = "https://app.aegister.com/api/v1/cloud-defender/precheck"
payload = {
"organization": 12,
"fqdn": "www.example.com",
"endpoint": "203.0.113.20"
}
headers = {
"X-Aegister-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Aegister-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({organization: 12, fqdn: 'www.example.com', endpoint: '203.0.113.20'})
};
fetch('https://app.aegister.com/api/v1/cloud-defender/precheck', 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://app.aegister.com/api/v1/cloud-defender/precheck",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'organization' => 12,
'fqdn' => 'www.example.com',
'endpoint' => '203.0.113.20'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Aegister-Token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.aegister.com/api/v1/cloud-defender/precheck"
payload := strings.NewReader("{\n \"organization\": 12,\n \"fqdn\": \"www.example.com\",\n \"endpoint\": \"203.0.113.20\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Aegister-Token", "<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))
}HttpResponse<String> response = Unirest.post("https://app.aegister.com/api/v1/cloud-defender/precheck")
.header("X-Aegister-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"organization\": 12,\n \"fqdn\": \"www.example.com\",\n \"endpoint\": \"203.0.113.20\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aegister.com/api/v1/cloud-defender/precheck")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Aegister-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"organization\": 12,\n \"fqdn\": \"www.example.com\",\n \"endpoint\": \"203.0.113.20\"\n}"
response = http.request(request)
puts response.read_body{
"error": 0,
"messages": [],
"data": {
"domain": {
"addresses": [
"203.0.113.20"
],
"public": true,
"status": 200,
"protected": false
},
"origin": {
"addresses": [
"203.0.113.20"
],
"public": true,
"status": 200,
"certificate": "valid"
},
"registered": false
}
}{
"error": 1,
"messages": [
"Invalid data provided"
]
}{
"error": 1,
"messages": []
}
