TLS Certificates
Check DNS and re-validate certificate
POST
/
v1
/
apps
/
{app_name}
/
certificates
/
{hostname}
/
check
Check DNS and re-validate certificate
curl --request POST \
--url https://api.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check \
--header 'Authorization: <api-key>'import requests
url = "https://api.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check', 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.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check"
req, _ := http.NewRequest("POST", 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.post("https://api.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"acme_requested": true,
"certificates": [
{
"created_at": "<string>",
"expires_at": "<string>",
"issued": [
{
"certificate_authority": "<string>",
"expires_at": "<string>",
"type": "rsa"
}
],
"issuer": "<string>",
"source": "custom",
"status": "active"
}
],
"configured": true,
"dns_provider": "<string>",
"dns_records": {
"a": [
"<string>"
],
"aaaa": [
"<string>"
],
"acme_challenge_cname": "<string>",
"cname": [
"<string>"
],
"ownership_txt": "<string>",
"resolved_addresses": [
"<string>"
],
"soa": "<string>"
},
"dns_requirements": {
"a": [
"<string>"
],
"aaaa": [
"<string>"
],
"acme_challenge": {
"name": "<string>",
"target": "<string>"
},
"cname": "<string>",
"ownership": {
"app_value": "<string>",
"name": "<string>",
"org_value": "<string>"
}
},
"hostname": "<string>",
"rate_limited_until": "<string>",
"status": "<string>",
"validation": {
"alpn_configured": true,
"dns_configured": true,
"http_configured": true,
"ownership_txt_configured": true
},
"validation_errors": [
{
"code": "<string>",
"message": "<string>",
"remediation": "<string>",
"timestamp": "<string>"
}
]
}Authorizations
A Fly API token with access to the requested organization or resource. Send it as Authorization: Bearer <Fly API token>.
Response
200 - application/json
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Check DNS and re-validate certificate
curl --request POST \
--url https://api.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check \
--header 'Authorization: <api-key>'import requests
url = "https://api.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check', 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.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check"
req, _ := http.NewRequest("POST", 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.post("https://api.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.machines.dev/v1/apps/{app_name}/certificates/{hostname}/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"acme_requested": true,
"certificates": [
{
"created_at": "<string>",
"expires_at": "<string>",
"issued": [
{
"certificate_authority": "<string>",
"expires_at": "<string>",
"type": "rsa"
}
],
"issuer": "<string>",
"source": "custom",
"status": "active"
}
],
"configured": true,
"dns_provider": "<string>",
"dns_records": {
"a": [
"<string>"
],
"aaaa": [
"<string>"
],
"acme_challenge_cname": "<string>",
"cname": [
"<string>"
],
"ownership_txt": "<string>",
"resolved_addresses": [
"<string>"
],
"soa": "<string>"
},
"dns_requirements": {
"a": [
"<string>"
],
"aaaa": [
"<string>"
],
"acme_challenge": {
"name": "<string>",
"target": "<string>"
},
"cname": "<string>",
"ownership": {
"app_value": "<string>",
"name": "<string>",
"org_value": "<string>"
}
},
"hostname": "<string>",
"rate_limited_until": "<string>",
"status": "<string>",
"validation": {
"alpn_configured": true,
"dns_configured": true,
"http_configured": true,
"ownership_txt_configured": true
},
"validation_errors": [
{
"code": "<string>",
"message": "<string>",
"remediation": "<string>",
"timestamp": "<string>"
}
]
}