ReferenceFlightcontrol APICustom DomainsGet a Single Domain

Get Single Domain

Retrieves details of a specific domain.

API Description

Full Endpoint URL: https://api.flightcontrol.dev/v1/domains/{domainId}

MethodPath
GET/v1/domains/{domainId}
Headers
AuthorizationBearer [API key]

Path Parameters

ParameterTypeDescription
domainIdstringThe unique CUID of the domain.

Response

Response Example

{
  "id": "cm7enen3g00045e87dq1z8gei",
  "fcAttachmentId": "cm7enen3m00065e87i4w08gaw",
  "name": "example.com",
  "status": "ATTACHED",
  "type": "SUBDOMAIN",
  "dnsRecords": [
    {
      "status": "OK",
      "purpose": "CERTIFICATE_DOMAIN_VERIFICATION",
      "type": "CNAME",
      "name": "_e430f3cb9e2c862fce8eb8aaffa4bcf6.www.example.com.",
      "value": "_a17d2924137bc0da6602c8ef6a5ddd93.zfyfvmchrl.acm-validations.aws.",
      "lastPropagationCheckAt": "2025-02-21T11:07:13.383Z"
    },
    {
      "status": "PENDING",
      "purpose": "SERVICE_CONNECTION",
      "type": "CNAME",
      "name": "www.example.com",
      "value": "dun5bc7rwkgfh.cloudfront.net",
      "lastPropagationCheckAt": null,
      "lastPropagationCheckValue": null,
      "lastPropagationCheckError": null
    },
    {
      "status": "OK",
      "purpose": "CERTIFICATE_AUTHORITY_AUTHORIZATION",
      "type": "CAA",
      "name": "@",
      "value": "0 issue \"amazon.com\"",
      "lastPropagationCheckAt": null,
      "lastPropagationCheckValue": null,
      "lastPropagationCheckError": null
    }
  ]
}

Response Fields

Domain status

The top level status field of the response above describes the current attachment status of the domain.

Added Domain Statuses

The following table describes the statuses a domain goes through when being added to a service:

StatusDescription
PENDINGThe domain was added but the attachment process hasn’t started yet
CREATINGThe attachment process has started and the resources related to this attachment are being created, namely the ACM certificate and the CloudFront distribution if none exists
AWAITING_VERIFICATION_RECORDS_TO_BE_SETThe domain is waiting for the verification records to be set
PENDING_CERTIFICATE_FOR_ATTACHMENTThe verification records have been found by us and now it’s waiting for AWS to also find them and issue the certificate
ATTACHINGThe certificate has been issued and it’s being attached to the CloudFront distribution
ATTACHEDThe domain is attached and ready to serve traffic. This is the final successful status.
ERROR_ATTACHINGThe domain attachment process failed

Domain Removal Statuses

The following table describes the statuses a domain goes through when being removed from a service:

StatusDescription
DETACHINGThe detachment process has been triggered
PENDING_CERTIFICATE_FOR_DETACHMENTThe new certificate without the removed domain is pending and once it is issued, the domain will be detached
ERROR_DETACHINGThe domain detachment process failed, which means that the domain is still attached to the CloudFront distribution

DNS Records Fields

The dnsRecords value of the response above corresponds to the DNS records that are associated with the domain.

DNS Record purpose

The following table describes the different purposes of the DNS records that can be associated with a domain:

PurposeDescription
CERTIFICATE_DOMAIN_VERIFICATIONThis DNS record is used to verify the domain ownership
CERTIFICATE_AUTHORITY_AUTHORIZATIONThis DNS record is used to authorize the domain for issuance
SERVICE_CONNECTIONThis DNS record is used to route traffic to the service

DNS Record status

The following table describes the different statuses of the DNS records that can be associated with a domain:

StatusDescription
OKThe DNS record is correctly configured
PENDINGThe DNS record has not been checked or it does not exist
PROPAGATINGThe DNS record was found with the correct expected value and is being propagated
ERROREither there was an error checking the DNS record or the record is incorrectly configured

We do not currently actively check the SERVICE_CONNECTION record. Which means that the status will always be PENDING.