domains
Creates, updates, deletes, gets or lists a domains resource.
Overview
| Name | domains |
| Type | Resource |
| Id | deno.domain.domains |
Fields
The following fields are returned by SELECT queries:
- list_domains
- get_domain
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the domain. |
certificates | array | TLS certificates for the domain. |
createdAt | string (date-time) | (example: 2021-08-01T00:00:00Z) |
deploymentId | string | A deployment ID Note that this is not UUID v4, as opposed to organization ID and project ID. (example: abcde12vwxyz) |
dnsRecords | array | These records are used to verify the ownership of the domain. |
domain | string | The domain value. (example: example.com) |
isValidated | boolean | Whether the domain's ownership is validated or not. |
organizationId | string (uuid) | The ID of the organization that the domain is associated with. |
projectId | string (uuid) | The ID of the project that the domain is associated with. If the domain is not associated with any project, this field is omitted. |
provisioningStatus | | |
token | string | (example: b7e28147130005f5593d09e6) |
updatedAt | string (date-time) | (example: 2021-08-01T00:00:00Z) |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the domain. |
certificates | array | TLS certificates for the domain. |
createdAt | string (date-time) | (example: 2021-08-01T00:00:00Z) |
deploymentId | string | A deployment ID Note that this is not UUID v4, as opposed to organization ID and project ID. (example: abcde12vwxyz) |
dnsRecords | array | These records are used to verify the ownership of the domain. |
domain | string | The domain value. (example: example.com) |
isValidated | boolean | Whether the domain's ownership is validated or not. |
organizationId | string (uuid) | The ID of the organization that the domain is associated with. |
projectId | string (uuid) | The ID of the project that the domain is associated with. If the domain is not associated with any project, this field is omitted. |
provisioningStatus | | |
token | string | (example: b7e28147130005f5593d09e6) |
updatedAt | string (date-time) | (example: 2021-08-01T00:00:00Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_domains | select | organizationId | page, limit, q, sort, order | This API returns a list of domains belonging to the specified organization in a pagenated manner. The URLs for the next, previous, first, and last page are returned in the Link header of the response, if any. |
get_domain | select | domainId | ||
create_domain | insert | organizationId, data__domain | This API allows you to add a new domain to the specified organization. ### Steps to make the added domain available for actual use In order to make the added domain available for actual use, you first need to verify that you are the owner of the domain by calling the verify ownership of a domain endpoint after properly setting up the DNS records for the domain as specified in the dnsRecords field of the response of this API.You then also need to have TLS certificates ready for the domain, either by enabling auto-provision or by uploading them manually. | |
delete_domain | delete | domainId | ||
update_domain_association | exec | domainId | This API allows you to either: 1. associate a domain with a deployment, or 2. disassociate a domain from a deployment Domain association is required in order to serve the deployment on the domain. If the ownership of the domain is not verified yet, this API will trigger the verification process before associating the domain with the deployment. The same functionality is provided by [Attach a domain to a deployment] with more flexibility. Consider using that API instead. [Attach a domain to a deployment]: #put-/deployments/-deploymentId-/domains/-domain- | |
verify_domain | exec | domainId | This API triggers the ownership verification of a domain. It should be called after necessary DNS records that appear in the dnsRecords fieldof the response of add a domain are set up. ### Domain reactivation If a previously vefified domain, owned by the same organization, was deleted and then re-added, deployments associated with the domain will become accessible via the domain once the verification is successfully completed. For example, if the domain *.example.com was owned and verified byexample-org and foo.example.com was attached to example-deployment,the deployment was accessible via foo.example.com. However, if the domainis deleted from the organization, access to the deployment via foo.example.com is lost, which we refer to as domain deactivation.Subsequently, if *.example.com (or even foo.example.com) is re-added tothe organization and verified, the deployment becomes accessible via foo.example.com again without any further steps, i.e. the domain isreactivated. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
domainId | string (uuid) | Domain ID |
organizationId | string (uuid) | Organization ID |
limit | integer | The maximum number of items to return per page. |
order | string | Sort order, either asc or desc. Defaults to asc. |
page | integer | The page number to return. |
q | string | Query by domain |
sort | string | The field to sort by, domain, created_at, or updated_at. Defaults to updated_at. |
SELECT examples
- list_domains
- get_domain
This API returns a list of domains belonging to the specified organization
in a pagenated manner.
The URLs for the next, previous, first, and last page are returned in theLink header of the response, if any.
SELECT
id,
certificates,
createdAt,
deploymentId,
dnsRecords,
domain,
isValidated,
organizationId,
projectId,
provisioningStatus,
token,
updatedAt
FROM deno.domain.domains
WHERE organizationId = '{{ organizationId }}' -- required
AND page = '{{ page }}'
AND limit = '{{ limit }}'
AND q = '{{ q }}'
AND sort = '{{ sort }}'
AND order = '{{ order }}'
;
Success
SELECT
id,
certificates,
createdAt,
deploymentId,
dnsRecords,
domain,
isValidated,
organizationId,
projectId,
provisioningStatus,
token,
updatedAt
FROM deno.domain.domains
WHERE domainId = '{{ domainId }}' -- required
;
INSERT examples
- create_domain
- Manifest
This API allows you to add a new domain to the specified organization.
### Steps to make the added domain available for actual use
In order to make the added domain available for actual use, you first need
to verify that you are the owner of the domain by calling
the verify ownership of a domain endpoint
after properly setting up the DNS records for the domain as specified in thednsRecords field of the response of this API.
You then also need to have TLS certificates ready for the domain, either by
enabling auto-provision
or by uploading them manually.
INSERT INTO deno.domain.domains (
data__domain,
organizationId
)
SELECT
'{{ domain }}' /* required */,
'{{ organizationId }}'
RETURNING
id,
certificates,
createdAt,
deploymentId,
dnsRecords,
domain,
isValidated,
organizationId,
projectId,
provisioningStatus,
token,
updatedAt
;
# Description fields are for documentation purposes
- name: domains
props:
- name: organizationId
value: string (uuid)
description: Required parameter for the domains resource.
- name: domain
value: string
DELETE examples
- delete_domain
No description available.
DELETE FROM deno.domain.domains
WHERE domainId = '{{ domainId }}' --required
;
Lifecycle Methods
- update_domain_association
- verify_domain
This API allows you to either:
1. associate a domain with a deployment, or
2. disassociate a domain from a deployment
Domain association is required in order to serve the deployment on the
domain.
If the ownership of the domain is not verified yet, this API will trigger
the verification process before associating the domain with the deployment.
The same functionality is provided by [Attach a domain to a deployment] with
more flexibility. Consider using that API instead.
[Attach a domain to a deployment]: #put-/deployments/-deploymentId-/domains/-domain-
EXEC deno.domain.domains.update_domain_association
@domainId='{{ domainId }}' --required
@@json=
'{
"deploymentId": "{{ deploymentId }}"
}'
;
This API triggers the ownership verification of a domain. It should be
called after necessary DNS records that appear in the dnsRecords field
of the response of add a domain
are set up.
### Domain reactivation
If a previously vefified domain, owned by the same organization, was deleted
and then re-added, deployments associated with the domain will become
accessible via the domain once the verification is successfully completed.
For example, if the domain *.example.com was owned and verified byexample-org and foo.example.com was attached to example-deployment,
the deployment was accessible via foo.example.com. However, if the domain
is deleted from the organization, access to the deployment viafoo.example.com is lost, which we refer to as domain deactivation.
Subsequently, if *.example.com (or even foo.example.com) is re-added to
the organization and verified, the deployment becomes accessible viafoo.example.com again without any further steps, i.e. the domain is
reactivated.
EXEC deno.domain.domains.verify_domain
@domainId='{{ domainId }}' --required
;