Organization API: Organization deployments: Domains
The 4 Organization API operations for domains.
Part of Organization deployments.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/domains |
List domains |
| POST | /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/domains |
Add a custom domain |
| DELETE | /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/domains/{hostname} |
Remove domain |
| POST | /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/domains/{hostname}/verify |
Look for the domain's TXT record (outside any transaction) |
List domains
Section titled List domainsGET /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/domains
The deployment's domains: its platform name first, then its custom
domains, each saying whether it is verified and whether its certificate
is issued; an unverified one carries the TXT record in
verification. limits.custom_domains is how many custom domains
it may have: none for a template, whose addresses are its servers'.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Add a custom domain
Section titled Add a custom domainPOST /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/domains
Add a custom domain. It gets no route until the TXT record in
verification is published and checked.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
hostname |
string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Remove domain
Section titled Remove domainDELETE /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/domains/{hostname}
Remove a custom domain: the hostname stops reaching the deployment,
and its route and certificate are deleted. The platform name cannot be
removed (409 platform_domain).
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
hostname |
path | string | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Look for the domain's TXT record (outside any transaction)
Section titled Look for the domain's TXT record (outside any transaction)POST /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/domains/{hostname}/verify
Look for the domain's TXT record (outside any transaction). Found: the domain is verified, its route is created and, once instances serve it, its certificate ordered.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
hostname |
path | string | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |