domains
Creates, updates, deletes, gets or lists a domains resource.
Overview
| Name | domains |
| Type | Resource |
| Id | cloudflare.registrar.domains |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get domain response
| Name | Datatype | Description |
|---|---|---|
errors | array | |
messages | array | |
result | object | |
success | boolean | Whether the API call was successful (true) |
List domains response
| Name | Datatype | Description |
|---|---|---|
id | string | Domain identifier. (example: ea95132c15732412d22c1476fa83f27a) |
available | boolean | Shows if a domain is available for transferring into Cloudflare Registrar. |
can_register | boolean | Indicates if the domain can be registered as a new domain. |
created_at | string (date-time) | Shows time of creation. (example: 2018-08-28T17:26:26Z) |
current_registrar | string | Shows name of current registrar. (example: Cloudflare) |
expires_at | string (date-time) | Shows when domain name registration expires. (example: 2019-08-28T23:59:59Z) |
locked | boolean | Shows whether a registrar lock is in place for a domain. |
registrant_contact | object | Shows contact information for domain registrant. |
registry_statuses | string | A comma-separated list of registry status codes. A full list of status codes can be found at EPP Status Codes. (example: ok,serverTransferProhibited) |
supported_tld | boolean | Whether a particular TLD is currently supported by Cloudflare Registrar. Refer to TLD Policies for a list of supported TLDs. |
transfer_in | object | Statuses for domain transfers into Cloudflare Registrar. |
updated_at | string (date-time) | Last updated. (example: 2018-08-28T17:26:26Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | domain_name, account_id | Show individual domain. | |
list | select | account_id | List domains handled by Registrar. | |
update | replace | domain_name, account_id | Update individual domain. |
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 |
|---|---|---|
account_id | string | The Cloudflare account ID. |
domain_name | string |
SELECT examples
- get
- list
Show individual domain.
SELECT
errors,
messages,
result,
success
FROM cloudflare.registrar.domains
WHERE domain_name = '{{ domain_name }}' -- required
AND account_id = '{{ account_id }}' -- required
;
List domains handled by Registrar.
SELECT
id,
available,
can_register,
created_at,
current_registrar,
expires_at,
locked,
registrant_contact,
registry_statuses,
supported_tld,
transfer_in,
updated_at
FROM cloudflare.registrar.domains
WHERE account_id = '{{ account_id }}' -- required
;
REPLACE examples
- update
Update individual domain.
REPLACE cloudflare.registrar.domains
SET
auto_renew = {{ auto_renew }},
locked = {{ locked }},
privacy = {{ privacy }}
WHERE
domain_name = '{{ domain_name }}' --required
AND account_id = '{{ account_id }}' --required
RETURNING
errors,
messages,
result,
success;