registrations
Creates, updates, deletes, gets or lists a registrations resource.
Overview
| Name | registrations |
| Type | Resource |
| Id | cloudflare.zero_trust.registrations |
Fields
The following fields are returned by SELECT queries:
- get
- list
Returns a Registration.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the registration. (example: 11ffb86f-3f0c-4306-b4a2-e62f872b166a) |
created_at | string | The RFC3339 timestamp when the registration was created. (example: 2025-02-14T13:17:00Z) |
deleted_at | string | The RFC3339 timestamp when the registration was deleted. (example: 2025-02-14T13:17:00Z) |
device | object | Device details embedded inside of a registration. |
key | string | The public key used to connect to the Cloudflare network. (example: U+QTP50RsWfeLGHF4tlGDnmGeuwtsz46KCHr5OyhWq00Rsdfl45mgnQAuEJ6CO0YrkyTl9FUf5iB0bwYR3g4EEFEHhtu6jFaqfMrBMBSz6itv9HQXkaR9OieKQ==) |
key_type | string | The 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_at | string | The RFC3339 timestamp when the registration was last seen. (example: 2025-02-14T13:17:00Z) |
policy | object | The device settings profile assigned to this registration. |
revoked_at | string | The RFC3339 timestamp when the registration was revoked. (example: 2025-02-14T13:17:00Z) |
tunnel_type | string | Type of the tunnel - wireguard or masque. (example: masque) |
updated_at | string | The RFC3339 timestamp when the registration was last updated. (example: 2025-02-14T13:17:00Z) |
user | object |
List of registrations response.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the registration. (example: 11ffb86f-3f0c-4306-b4a2-e62f872b166a) |
created_at | string | The RFC3339 timestamp when the registration was created. (example: 2025-02-14T13:17:00Z) |
deleted_at | string | The RFC3339 timestamp when the registration was deleted. (example: 2025-02-14T13:17:00Z) |
device | object | Device details embedded inside of a registration. |
key | string | The public key used to connect to the Cloudflare network. (example: U+QTP50RsWfeLGHF4tlGDnmGeuwtsz46KCHr5OyhWq00Rsdfl45mgnQAuEJ6CO0YrkyTl9FUf5iB0bwYR3g4EEFEHhtu6jFaqfMrBMBSz6itv9HQXkaR9OieKQ==) |
key_type | string | The 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_at | string | The RFC3339 timestamp when the registration was last seen. (example: 2025-02-14T13:17:00Z) |
policy | object | The device settings profile assigned to this registration. |
revoked_at | string | The RFC3339 timestamp when the registration was revoked. (example: 2025-02-14T13:17:00Z) |
tunnel_type | string | Type of the tunnel - wireguard or masque. (example: masque) |
updated_at | string | The RFC3339 timestamp when the registration was last updated. (example: 2025-02-14T13:17:00Z) |
user | object |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | registration_id, account_id | include | Fetches a single WARP registration. |
list | select | account_id | user.id, seen_after, seen_before, status, per_page, search, sort_by, sort_order, cursor, id, device.id, include | Lists WARP registrations. |
unrevoke | insert | account_id | id | Unrevokes a list of WARP registrations. |
delete | delete | registration_id, account_id | Deletes a WARP registration. | |
bulk_delete | delete | account_id | id | Deletes a list of WARP registrations. |
revoke | exec | account_id | id | Revokes 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
registration_id | string | |
cursor | string | Opaque 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.id | string | Filter by WARP device ID. |
id | array | A list of registration IDs to revoke. |
include | string | Comma-separated list of additional information that should be included in the registration response. Supported values are: "policy". |
per_page | integer (uint64) | The maximum number of devices to return in a single response. |
search | string | Filter by registration details. |
seen_after | string | Filter by the last_seen timestamp - returns only registrations last seen after this timestamp. |
seen_before | string | Filter by the last_seen timestamp - returns only registrations last seen before this timestamp. |
sort_by | string | The registration field to order results by. |
sort_order | string | Sort direction. |
status | string | Filter by registration status. Defaults to 'active'. |
user.id | array | Filter by user ID. |
SELECT examples
- get
- list
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 }}'
;
Lists WARP registrations.
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 account_id = '{{ account_id }}' -- required
AND user.id = '{{ user.id }}'
AND seen_after = '{{ seen_after }}'
AND seen_before = '{{ seen_before }}'
AND status = '{{ status }}'
AND per_page = '{{ per_page }}'
AND search = '{{ search }}'
AND sort_by = '{{ sort_by }}'
AND sort_order = '{{ sort_order }}'
AND cursor = '{{ cursor }}'
AND id = '{{ id }}'
AND device.id = '{{ device.id }}'
AND include = '{{ include }}'
;
INSERT examples
- unrevoke
- Manifest
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
;
# Description fields are for documentation purposes
- name: registrations
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the registrations resource.
- name: id
value: "{{ id }}"
description: A list of registration IDs to unrevoke.
description: A list of registration IDs to unrevoke.
DELETE examples
- delete
- bulk_delete
Deletes a WARP registration.
DELETE FROM cloudflare.zero_trust.registrations
WHERE registration_id = '{{ registration_id }}' --required
AND account_id = '{{ account_id }}' --required
;
Deletes a list of WARP registrations.
DELETE FROM cloudflare.zero_trust.registrations
WHERE account_id = '{{ account_id }}' --required
AND id = '{{ id }}'
;
Lifecycle Methods
- revoke
Revokes a list of WARP registrations.
EXEC cloudflare.zero_trust.registrations.revoke
@account_id='{{ account_id }}' --required,
@id='{{ id }}'
;