Get a list of environment domains
curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "<string>",
"name": "<string>",
"attributes": {},
"id": "<string>",
"project": "<string>",
"registered_name": "<string>",
"is_default": true
}
]Domain Management
Get a list of environment domains
Retrieve a list of objects representing the user-specified domains
associated with an environment. Note that this does not return the
.platformsh.site subdomains, which are automatically assigned to
the environment.
GET
/
projects
/
{projectId}
/
environments
/
{environmentId}
/
domains
Get a list of environment domains
curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/domains")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "<string>",
"name": "<string>",
"attributes": {},
"id": "<string>",
"project": "<string>",
"registered_name": "<string>",
"is_default": true
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
default - application/json
- Option 1
- Option 2
The creation date
The update date
The type of domain
The domain name
Arbitrary attributes attached to this resource
Show child attributes
Show child attributes
The identifier of ProdDomainStorage
The name of the project
The claimed domain name
Is this domain default
Last modified on June 16, 2026
Was this page helpful?