Skip to main content

domains

Creates, updates, deletes, gets or lists a domains resource.

Overview

Namedomains
TypeResource
Idcloudflare.registrar.domains

Fields

The following fields are returned by SELECT queries:

Get domain response

NameDatatypeDescription
errorsarray
messagesarray
resultobject
successbooleanWhether the API call was successful (true)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomain_name, account_idShow individual domain.
listselectaccount_idList domains handled by Registrar.
updatereplacedomain_name, account_idUpdate 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
domain_namestring

SELECT examples

Show individual domain.

SELECT
errors,
messages,
result,
success
FROM cloudflare.registrar.domains
WHERE domain_name = '{{ domain_name }}' -- required
AND account_id = '{{ account_id }}' -- required
;

REPLACE examples

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;