Skip to main content

hostnames

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

Overview

Namehostnames
TypeResource
Idcloudflare.web3.hostnames

Fields

The following fields are returned by SELECT queries:

Web3 Hostname Details response.

NameDatatypeDescription
idstringSpecify the identifier of the hostname. (example: 023e105f4ecef8ad9ca31a8372d0c353)
namestringSpecify the hostname that points to the target gateway via CNAME. (example: gateway.example.com)
created_onstring (date-time) (example: 2014-01-01T05:20:00.12345Z)
descriptionstringSpecify an optional description of the hostname. (example: This is my IPFS gateway.)
dnslinkstringSpecify the DNSLink value used if the target is ipfs. (example: /ipns/onboarding.ipfs.cloudflare.com)
modified_onstring (date-time) (example: 2014-01-01T05:20:00.12345Z)
statusstringSpecifies the status of the hostname's activation. (active, pending, deleting, error) (example: active)
targetstringSpecify the target gateway of the hostname. (ethereum, ipfs, ipfs_universal_path) (example: ipfs)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectidentifier, zone_id
listselectzone_id
createinsertzone_id, name, target
editupdateidentifier, zone_id
deletedeleteidentifier, zone_id

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
identifierstringResource identifier.
zone_idstringThe Cloudflare zone ID.

SELECT examples

Web3 Hostname Details response.

SELECT
id,
name,
created_on,
description,
dnslink,
modified_on,
status,
target
FROM cloudflare.web3.hostnames
WHERE identifier = '{{ identifier }}' -- required
AND zone_id = '{{ zone_id }}' -- required
;

INSERT examples

No description available.

INSERT INTO cloudflare.web3.hostnames (
description,
dnslink,
name,
target,
zone_id
)
SELECT
'{{ description }}',
'{{ dnslink }}',
'{{ name }}' /* required */,
'{{ target }}' /* required */,
'{{ zone_id }}'
RETURNING
errors,
messages,
result,
result_info,
success
;

UPDATE examples

No description available.

UPDATE cloudflare.web3.hostnames
SET
description = '{{ description }}',
dnslink = '{{ dnslink }}'
WHERE
identifier = '{{ identifier }}' --required
AND zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
result,
result_info,
success;

DELETE examples

No description available.

DELETE FROM cloudflare.web3.hostnames
WHERE identifier = '{{ identifier }}' --required
AND zone_id = '{{ zone_id }}' --required
;