Skip to content
WP EngineDocumentation

Lists DomainMappings of an environment. Includes all DomainMappings currently being created or deleted.

GET
/v1/accounts/{account}/apps/{app}/environments/{environment}/domainMappings
curl --request GET \
--url https://js.wpengineapi.com/v1/accounts/example/apps/example/environments/example/domainMappings \
--header 'Authorization: Basic <credentials>'
account
required
string

Name of your WP Engine Headless Platform account

app
required
string

Name of your Headless Platform application

environment
required
string

ID of your environment

pageSize
integer format: int32

Pagination is not supported yet. The maximum number of DomainMappings to return. The service may return fewer than this value. If unspecified, no more than 25 domains will be returned. The maximum value is 200, values above 200 will be coerced to 200.

pageToken
string

A page token, returned from the previous ListDomainMappings call. Provide this to retrieve the next page.

filter
string

Filter string to filter listed DomainMappings. Supported filters are:

  • domain e.g. domain=example.com will return DomainMapping with domain “example.com”

A successful response.

Media typeapplication/json

Response including listed DomainMappings.

object
domainMappings

A list of DomainMappings.

Array<object>
DomainMapping represents a domain associated with an environment
object
destinationDomainMapping
Domain redirect associated with this DomainMapping in the format of accounts/{account}/apps/{app}/environments/{environment}/domainMappings/{domain_mapping}
string
destinationDomainMappingState
Possible states of a DomainMapping
  • STATE_UNSPECIFIED: Domain mapping state is unknown
  • CREATING: Domain mapping is being created
  • DELETING: Domain mapping is being deleted
  • ACTIVE: Domain mapping is deployed. Does not necessarily mean that the domain is already directing to the environment, as Cloudflare status is currently not checked
  • FAILED: Domain mapping creation has failed, or domain was created but is no longer active due to other error
string
default: STATE_UNSPECIFIED
Allowed values: STATE_UNSPECIFIED CREATING DELETING ACTIVE FAILED
domain
required
Domain name of the domain associated with the environment by this DomainMapping Must be a valid domain name as defined in RFC-1123
string
name
Output only. Domain mapping name in the format of: `accounts/{account}/apps/{app}/environments/{environment}/domainMappings/{domain_mapping}`
string
primary
Defines if domain mapping is primary
boolean
state
Possible states of a DomainMapping
  • STATE_UNSPECIFIED: Domain mapping state is unknown
  • CREATING: Domain mapping is being created
  • DELETING: Domain mapping is being deleted
  • ACTIVE: Domain mapping is deployed. Does not necessarily mean that the domain is already directing to the environment, as Cloudflare status is currently not checked
  • FAILED: Domain mapping creation has failed, or domain was created but is no longer active due to other error
string
default: STATE_UNSPECIFIED
Allowed values: STATE_UNSPECIFIED CREATING DELETING ACTIVE FAILED
txtRecordVerifiedTime
Domain mapping txt record verified at
string format: date-time
txtVerificationName
Domain mapping txt verification record name
string
txtVerificationValue
Domain mapping txt verification record value
string
nextPageToken

A token which can be sent as page_token to retrieve the next page. Unset if there are no more pages.

string
Example
{
"domainMappings": [
{
"destinationDomainMappingState": "STATE_UNSPECIFIED",
"state": "STATE_UNSPECIFIED"
}
]
}