You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
domain:get / environment:get report no environment for a domain the dashboard shows as attached #279
A custom domain (root domain, www redirect to the bare domain) is shown in the dashboard under the environment's Domains, and the site works over https. The CLI reports it as not attached in two places:
cloud domain:list <environment-id> --json -n does return the domain (its environmentId also shows null), so the API knows the domain belongs to the environment.
Cause, from reading the CLI source and the API docs (not confirmed against a raw API response)
The API returns a relationship only when the request names it in include.
Domain environmentId:DomainsResource never sets include, while the API docs list include=environment for GET /domains/{id} and GET /environments/{id}/domains. So Domain::createFromResponse never sees relationships.environment. A fix is open in Request the environment include when fetching domains #280.
Environment domainIds: the documented include values for the environment endpoints do not contain domains, so the CLI cannot request them. This needs an API change, or the CLI could fill it from the domain list.
Environment primaryDomainId: the CLI already requests primaryDomain, so I don't know why it is still null. It may be that the domain has no primary set because it was added in the dashboard.
Expected
environmentId, domainIds and primaryDomainId match what the dashboard shows.
Notes
Hostname, SSL and origin status are all verified, for the root and www.
Reproduced on CLI v0.7.0 (latest) and on v0.5.3, installed globally with Composer. One application, one environment.
Edited twice to correct my earlier guesses: domain:list does filter by environment, and the missing domain link is a missing include, not an API omission.
Update after checking the live API (read-only calls):
environmentId on a domain: confirmed. The API returns the environment link only with include=environment (200, link present), and without it relationships is empty. The fix is in Request the environment include when fetching domains #280.
domainIds on an environment:GET /environments/{id}?include=domains returns 400: "Requested include(s) domains are not allowed. Allowed include(s) are application, branch, deployments, currentDeployment, primaryDomain, instances, database, cache, buckets, websocketApplication, secrets." The domains are available from GET /environments/{id}/domains, so I don't know if the missing include is intended. Either the API could allow include=domains, or environment:get could fill domainIds from the domain list.
primaryDomainId:GET /environments/{id}?include=primaryDomain returns 200 with primaryDomain: {"data": null}. So the CLI asks correctly and no primary domain is set for this environment (the domain was added in the dashboard). That looks like data, not a bug, unless the dashboard is meant to set one.
Activity
jigar-dhulla commentedon Oct 24, 2026
Update after checking the live API (read-only calls):
environmentIdon a domain: confirmed. The API returns the environment link only withinclude=environment(200, link present), and without itrelationshipsis empty. The fix is in Request the environment include when fetching domains #280.domainIdson an environment:GET /environments/{id}?include=domainsreturns 400: "Requested include(s)domainsare not allowed. Allowed include(s) areapplication, branch, deployments, currentDeployment, primaryDomain, instances, database, cache, buckets, websocketApplication, secrets." The domains are available fromGET /environments/{id}/domains, so I don't know if the missing include is intended. Either the API could allowinclude=domains, orenvironment:getcould filldomainIdsfrom the domain list.primaryDomainId:GET /environments/{id}?include=primaryDomainreturns 200 withprimaryDomain: {"data": null}. So the CLI asks correctly and no primary domain is set for this environment (the domain was added in the dashboard). That looks like data, not a bug, unless the dashboard is meant to set one.