This update added endpoints for managing the Subdomains of a Base Domain, and deprecated the Site SSL endpoints and fields in favor of their Subdomain replacements. It also changed GET /api/v0/base-domains/{base_domain_uuid}/subdomains to return Subdomains rather than Sites, which affects any code that reads its items as Sites.
Added#
- Added Subdomain endpoints under
/api/v0/base-domains/{base_domain_uuid}/subdomains, allowing you to create, get, update, and delete Subdomains. - Added
POST …/subdomains/{subdomain_uuid}/sites,PUT …/sites/{site_uuid},PUT …/sites/{site_uuid}/swap, andDELETE …/sites/{site_uuid}, allowing you to add a Site to a Subdomain at a subpath, change its subpath, swap it for another Site in one step, and remove it. - Added
POST …/subdomains/{subdomain_uuid}/redirectandPOST …/subdomains/{subdomain_uuid}/site, allowing you to switch a Subdomain between redirecting visitors and serving Sites. Redirects use a 301, 302, 307, or 308 status code. - Added
POST …/subdomains/{subdomain_uuid}/fallback, allowing you to make a Subdomain the Fallback Redirect for its Base Domain. - Added
POST …/subdomains/{subdomain_uuid}/ssl/retry, allowing you to retry issuing the SSL Certificate for a Subdomain, at most once a minute. - Added
GETandPOST …/subdomains/{subdomain_uuid}/checks,POST …/subdomains/{subdomain_uuid}/dns/fix, andPOST …/subdomains/{subdomain_uuid}/dns/updated, allowing you to list the DNS checks for a Subdomain, check its DNS now, fix its record on CloudCannon DNS, and tell CloudCannon you have updated its record. - Added
GET /api/v0/base-domains/{base_domain_uuid}/dns/checks,POST …/dns/check,POST …/dns/nameservers-updated,POST …/dns/wildcard-updated, andPOST …/dns/wildcard-record-updated, allowing you to list and run nameserver checks, and tell CloudCannon you have updated your nameservers or wildcard records. - Added
GET /api/v0/ssl-certificates/{ssl_certificate_uuid}/subdomains, allowing you to list the Subdomains that use an SSL Certificate, including Redirect Subdomains, on the Base Domains you can read. - Added the
fallback_redirect_statusandlower_subdomainsfields toPUT /api/v0/base-domains/{base_domain_uuid}, allowing you to set the status code of the Fallback Redirect, and to lower the minimum TLS version of your Subdomains along with your Base Domain. - Added DNS setup fields to Base Domain responses, such as
dns_setup_stage,wildcard_certificate,disconnect_blockers,found_name_servers,wildcard_record_checked_at,wildcard_record_found, andwildcard_record_updated_at. Fields that need a live check are filled only byGET /api/v0/base-domains/{base_domain_uuid}and the DNS endpoints. - Added the
hostnamesandremoval_requested_atfields to SSL Certificate responses, and aremovingfilter toGET /api/v0/orgs/{org_uuid}/ssl-certificates. - Added a
subdomain_uuidfield to Site responses, allowing you to find the Subdomain a Site is served on.
Changed#
- Changed
GET /api/v0/base-domains/{base_domain_uuid}/subdomainsto return Subdomains rather than Sites. Each item has its ownuuid, anis_fallbackfield in place ofis_fallback_redirect, and asitesarray in place ofsite_uuidandsite_id. The list now includes Redirect Subdomains and Subdomains with no Site, and needs only permission to read the Base Domain. - Changed
PUT /api/v0/sites/{site_uuid}/domainto stop connecting a new Base Domain. It needs the Base Domain connected to your Organization first, and permission to edit the settings of both the current and the new Base Domain. - Changed
DELETE /api/v0/ssl-certificates/{ssl_certificate_uuid}to remove a certificate that Subdomains still use, rather than refusing it. Every Subdomain that uses it switches to a certificate CloudCannon issues. It returns202while Subdomains still serve the certificate, and204once it is deleted. - Changed
DELETE /api/v0/base-domains/{base_domain_uuid}to refuse while redirects lead to or from the Base Domain, and to list each one in the error. - Changed
PUT /api/v0/base-domains/{base_domain_uuid}/migrateto need permission to edit the DNS of the Base Domain as well as its settings. - Changed the
hosting_choice,force_ssl,auto_generate_ssl, andssl_certificatefilters on the Site list endpoints to match only Sites with a Custom Domain.
Deprecated#
- Deprecated the Site SSL endpoints and fields. They still work, but each has a replacement on the Subdomain a Site is served on, which the
subdomain_uuidfield on the Site identifies.PUT /api/v0/sites/{site_uuid}/ssl,DELETE /api/v0/sites/{site_uuid}/ssl, andPUT /api/v0/sites/{site_uuid}/ssl/cloudflareare replaced byPUT /api/v0/base-domains/{base_domain_uuid}/subdomains/{subdomain_uuid}.POST /api/v0/sites/{site_uuid}/ssl/autoandPOST /api/v0/sites/{site_uuid}/ssl/cloudflareare replaced byPOST …/subdomains/{subdomain_uuid}/ssl/retry, and share its limit of one retry a minute.POST /api/v0/sites/{site_uuid}/domain/prioritiseis replaced byPOST …/subdomains/{subdomain_uuid}/fallback.- The
hosting_choice,force_ssl,auto_generate_ssl, andssl_certificate_idfields onPUT /api/v0/sites/{site_uuid}/hostingare replaced by the same fields on the Subdomain. On a Site without a Custom Domain, these fields return an error unless the value matches the one the Site already reports. - The
sitesfield onGET /api/v0/ssl-certificates/{ssl_certificate_uuid}is replaced byGET /api/v0/ssl-certificates/{ssl_certificate_uuid}/subdomains.
Removed#
- Removed the
sitesfield fromGET /api/v0/orgs/{org_uuid}/ssl-certificatesandPOST /api/v0/orgs/{org_uuid}/ssl-certificates. - Removed the
wildcardfield fromPUT /api/v0/sites/{site_uuid}/ssl/cloudflare. Sending it returns an error. - Removed the
externalvalue ofhosting_choiceonPUT /api/v0/sites/{site_uuid}/hosting. - Removed the
cloudflare_errorfilter and thepriority_domain_atsort fromGET /api/v0/orgs/{org_uuid}/sitesandGET /api/v0/projects/{project_uuid}/sites.