Domain aliases
Last updated
Last updated
Note: this API is in beta currently and is subject to change in the future.
The Domain aliases resource allows creation of alternate URLs for Site objects that can be hosted under a different domain and/or directory. These URLs render a copy of the Site, but can modify certain fields to change their properties.
The most common use of Domain aliases is to create alternate URLs for different languages or language/regions.
A domain alias contains the following fields
POST /api/v2/domain_aliases/
List all domain aliases including active and deleted
List all domain aliases associated with a Site ID
Fetch the Domain alias detail using the DomainAlias.id
You can PUT
a partial or full object to the detail endpoint to update/change values on the Domain alias object. If using a partial object, you must insure that the primary domain alias id
is part of the payload.
To disable an active domain alias and clear all cache references to the domain, use the DELETE
method on the Domain alias detail endpoint.
To enable a currently disabled domain alias, you will set the param for deleted
to False
using the Update endpoint
Attribute
Type
Description
id
integer
unique id of the domain alias
site_id
integer
Reference id to the Site this domain alias is connected to
user_id
integer
Reference id to the User that created this domain alias
deleted
boolean
Field that denotes if the domain alias is disabled or not
base_directory
string
For landing pages, the directory that the domain alias will be published - Default is /
formatted_domain
string
The hostname/domain where the domain alias is published, including the domain and subdomain (i.e www.example.com
)
formatted_url
string
Read-only field that formats the domain, base directory and scheme (i.e. https://www.example.com/
)
domain
string
The domain part of the formatted_domain
(i.e. www.example.com
)
preview_url
string
Preview URL for this domain alias. Should always be available regardless of published status
partner_alias_id
string
Unique ID reference to partner IDs
language_code
string
The default language (plus specific region) for the domain alias. Similar to the values that browsers send. Examples: en
, en-us
custom_fields
object
Custom field values assigned to the domain alias. This extends the parent Site's custom fields so only translated fields need to be provided
added
timestamp
Date and time domain alias was created
modified
timestamp
Date and time domain alias was modified
Attribute
formatted_domain
site_id
language_code
Name
Type
Description
language_code
string
Filter for domain aliases with a matching locale
site_id
integer
Filter for domain aliases associated with a particular Site