Version 2.1.1792967583 · latest Download OpenAPI Markdown

CNAME access domains

Admin only. Root domains used to build CNAME access names, each owned by a DNS provider account; supports migrating everything to a new root domain and checking whether customers have switched their records.

cname-domainsDNS and accessAuthentication: Admin only12 endpoints

List CNAME access domains

GET/api/v2/cname-domains
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
pageinteger— Page number, starting from 1
Default 1
page_sizeinteger— Items per page
Default 20
sortstring— Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id`
domainstring— Only list root domains containing this text (partial match, case-insensitive; surrounding spaces and a trailing dot are ignored).
typestring— Only list domains belonging to this provider type (such as aliyun).
dns_provider_idinteger— Only list domains belonging to this account.
statusCnameDomainStatus— Only list domains in this status.
Values ["active","retiring"]

Create CNAME access domain

POST/api/v2/cname-domains
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
dns_provider_idintegerRequired ID of the provider account hosting this root domain.
domainstringRequired Lowercase root domain, such as cdn.example.com.
expected_updated_atstring— Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create.
expire_atstring— Expiry date entered by the admin, YYYY-MM-DD; the admin is reminded 30, 7 and 1 days before expiry and once after it.
remarkstring— Remark
statusCnameDomainStatus— active: in use; retiring: being retired (migrated away, no longer offered when choosing a package domain).
Values ["active","retiring"]

Batch set CNAME access domain status

PUT/api/v2/cname-domains/status
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
idsinteger[]Required IDs of the access domains to update.
statusCnameDomainStatusRequired active: in use; retiring: being retired (migrated away, no longer offered when choosing a package domain).
Values ["active","retiring"]

Get CNAME access domain

GET/api/v2/cname-domains/{id}
Authentication: Admin only

Update CNAME access domain

PUT/api/v2/cname-domains/{id}
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
dns_provider_idintegerRequired ID of the provider account hosting this root domain.
domainstringRequired Lowercase root domain, such as cdn.example.com.
expected_updated_atstring— Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create.
expire_atstring— Expiry date entered by the admin, YYYY-MM-DD; the admin is reminded 30, 7 and 1 days before expiry and once after it.
remarkstring— Remark
statusCnameDomainStatus— active: in use; retiring: being retired (migrated away, no longer offered when choosing a package domain).
Values ["active","retiring"]

Delete CNAME access domain

DELETE/api/v2/cname-domains/{id}
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
local_onlyboolean— When true, delete only the local record and do not clean up provider-side records under this root domain.

Migrate CNAME access domain

POST/api/v2/cname-domains/{id}/migrate
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
notifyboolean— Whether to send in-app messages to the affected customers.
Default true
retireboolean— Whether to set the old domain to retiring.
Default true
target_idintegerRequired ID of the target root domain.

Get CNAME access domain references

GET/api/v2/cname-domains/{id}/refs
Authentication: Admin only

Check switch status after migration

GET/api/v2/cname-domains/{id}/switch-check
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
pageinteger— Page number, starting from 1
Default 1
page_sizeinteger— Items per page
Default 20
stateCnameSwitchState— Only list rows in this check state.
Values ["changed","unchanged","not_cname","failed","pending"]
qstring— Fuzzy match on customer name, site domain or actual resolution.

Export switch check table

GET/api/v2/cname-domains/{id}/switch-check/export
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
stateCnameSwitchState— Only list rows in this check state.
Values ["changed","unchanged","not_cname","failed","pending"]
qstring— Fuzzy match on customer name, site domain or actual resolution.

Remind customers who have not switched

POST/api/v2/cname-domains/{id}/switch-check/remind
Authentication: Admin only

Run switch check now

POST/api/v2/cname-domains/{id}/switch-check/run
Authentication: Admin only

CNAME access domains object

FieldTypeRequiredDescription
actualstring— What it actually resolves to (CNAME target or IP); on lookup failure, the reason (NXDOMAIN, Timeout, ...).
changedinteger— Number of rows now switched.
check_rowsinteger— Number of check rows created (one per site domain).
checkedinteger— Number of rows rechecked.
checked_atstring— Time of the last resolution check.
created_atstring— Created at
read-only
dns_provider_idinteger— ID of the provider account hosting this root domain.
domainstring— Lowercase root domain, such as cdn.example.com.
example_hostnamestring— An existing access name (without the root domain), used by the wizard to build old and new access address examples.
expected_updated_atstring— Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create.
expire_atstring— Expiry date entered by the admin, YYYY-MM-DD; the admin is reminded 30, 7 and 1 days before expiry and once after it.
failedinteger— Number of rows whose lookup failed.
fromstring— Source root domain.
idinteger— Record ID
read-only
idsinteger[]Required IDs of the access domains to update.
messagedinteger— Number of customers who received an in-app message.
new_targetstring— CNAME target after the switch.
not_cnameinteger— Number of rows not using a CNAME.
notified_atstring— Time the customer was notified.
notifyboolean— Whether to send in-app messages to the affected customers.
Default true
old_targetstring— CNAME target before the switch.
packageinteger— Number of package access names switched.
package_liststring[]— First 20 purchased packages referencing this root domain.
provider_namestring— Name of the owning account.
provider_typestring— Provider type of the owning account.
remarkstring— Remark
retireboolean— Whether to set the old domain to retiring.
Default true
siteinteger— Number of site access names switched.
site_idinteger— Site ID
site_liststring[]— List of site access names switched.
skippedobject[]— Skipped access domains with reasons.
stateCnameSwitchState— changed: already switched; unchanged: not switched yet; not_cname: not a CNAME access (points elsewhere or only has an A record); failed: lookup failed; pending: waiting to be checked.
Values ["changed","unchanged","not_cname","failed","pending"]
statusCnameDomainStatus— active: in use; retiring: being retired (migrated away, no longer offered when choosing a package domain).
Values ["active","retiring"]
streaminteger— Number of TCP/UDP forwarding access names switched.
stream_liststring[]— First 20 TCP/UDP forwardings (id:<id> <access name>).
switched_atstring— Time of the migration; empty if not migrated.
switched_tointeger— ID of the root domain it was migrated to.
switched_to_domainstring— Name of the root domain it was migrated to; empty if not migrated.
target_idintegerRequired ID of the target root domain.
tenant_idinteger— Owner tenant (user) ID
tostring— Target root domain.
unchangedinteger— Number of rows still not switched.
updatedinteger— Number of domains actually updated.
updated_atstring— Updated at
read-only
user_liststring[]— List of affected customers.
user_namestring— Customer (tenant) name; empty if the tenant was deleted.
usersinteger— Number of affected customers (distinct tenants owning the sites).