Skip to main content

registrations

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

Overview

Nameregistrations
TypeResource
Idcloudflare.zero_trust.registrations

Fields

The following fields are returned by SELECT queries:

Returns a Registration.

NameDatatypeDescription
idstringThe ID of the registration. (example: 11ffb86f-3f0c-4306-b4a2-e62f872b166a)
created_atstringThe RFC3339 timestamp when the registration was created. (example: 2025-02-14T13:17:00Z)
deleted_atstringThe RFC3339 timestamp when the registration was deleted. (example: 2025-02-14T13:17:00Z)
deviceobjectDevice details embedded inside of a registration.
keystringThe public key used to connect to the Cloudflare network. (example: U+QTP50RsWfeLGHF4tlGDnmGeuwtsz46KCHr5OyhWq00Rsdfl45mgnQAuEJ6CO0YrkyTl9FUf5iB0bwYR3g4EEFEHhtu6jFaqfMrBMBSz6itv9HQXkaR9OieKQ==)
key_typestringThe type of encryption key used by the WARP client for the active key. Currently 'curve25519' for WireGuard and 'secp256r1' for MASQUE. (example: secp256r1)
last_seen_atstringThe RFC3339 timestamp when the registration was last seen. (example: 2025-02-14T13:17:00Z)
policyobjectThe device settings profile assigned to this registration.
revoked_atstringThe RFC3339 timestamp when the registration was revoked. (example: 2025-02-14T13:17:00Z)
tunnel_typestringType of the tunnel - wireguard or masque. (example: masque)
updated_atstringThe RFC3339 timestamp when the registration was last updated. (example: 2025-02-14T13:17:00Z)
userobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregistration_id, account_idincludeFetches a single WARP registration.
listselectaccount_iduser.id, seen_after, seen_before, status, per_page, search, sort_by, sort_order, cursor, id, device.id, includeLists WARP registrations.
unrevokeinsertaccount_ididUnrevokes a list of WARP registrations.
deletedeleteregistration_id, account_idDeletes a WARP registration.
bulk_deletedeleteaccount_ididDeletes a list of WARP registrations.
revokeexecaccount_ididRevokes a list of WARP registrations.

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.
registration_idstring
cursorstringOpaque token indicating the starting position when requesting the next set of records. A cursor value can be obtained from the result_info.cursor field in the response.
device.idstringFilter by WARP device ID.
idarrayA list of registration IDs to revoke.
includestringComma-separated list of additional information that should be included in the registration response. Supported values are: "policy".
per_pageinteger (uint64)The maximum number of devices to return in a single response.
seen_afterstringFilter by the last_seen timestamp - returns only registrations last seen after this timestamp.
seen_beforestringFilter by the last_seen timestamp - returns only registrations last seen before this timestamp.
sort_bystringThe registration field to order results by.
sort_orderstringSort direction.
statusstringFilter by registration status. Defaults to 'active'.
user.idarrayFilter by user ID.

SELECT examples

Fetches a single WARP registration.

SELECT
id,
created_at,
deleted_at,
device,
key,
key_type,
last_seen_at,
policy,
revoked_at,
tunnel_type,
updated_at,
user
FROM cloudflare.zero_trust.registrations
WHERE registration_id = '{{ registration_id }}' -- required
AND account_id = '{{ account_id }}' -- required
AND include = '{{ include }}'
;

INSERT examples

Unrevokes a list of WARP registrations.

INSERT INTO cloudflare.zero_trust.registrations (
account_id,
id
)
SELECT
'{{ account_id }}',
'{{ id }}'
RETURNING
errors,
messages,
result,
result_info,
success
;

DELETE examples

Deletes a WARP registration.

DELETE FROM cloudflare.zero_trust.registrations
WHERE registration_id = '{{ registration_id }}' --required
AND account_id = '{{ account_id }}' --required
;

Lifecycle Methods

Revokes a list of WARP registrations.

EXEC cloudflare.zero_trust.registrations.revoke
@account_id='{{ account_id }}' --required,
@id='{{ id }}'
;