accounts_devices
Creates, updates, deletes, gets or lists an accounts_devices resource.
Overview
| Name | accounts_devices |
| Type | Resource |
| Id | cloudflare.zero_trust.accounts_devices |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get device details response.
| Name | Datatype | Description |
|---|---|---|
id | string | Registration ID. Equal to Device ID except for accounts which enabled multi-user mode. (example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415) |
name | string | The device name. (example: My mobile device) |
gateway_device_id | string | (example: PD33E90AXfafe14643cbbbc-4a0ed4fc8415Q) |
account | object | |
created | string (date-time) | When the device was created. (example: 2017-06-14T00:00:00Z) |
deleted | boolean | True if the device was deleted. |
device_type | string | (example: windows) |
ip | string | IPv4 or IPv6 address. (example: 1.1.1.1) |
key | string | The device's public key. (example: yek0SUYoOQ10vMGsIYAevozXUQpQtNFJFfFGqER/BGc=) |
key_type | string | Type of the key. (example: curve25519) |
last_seen | string (date-time) | When the device last connected to Cloudflare services. (example: 2017-06-14T00:00:00Z) |
mac_address | string | The device mac address. (example: 00-00-5E-00-53-00) |
model | string | The device model name. (example: MyPhone(pro-X)) |
os_version | string | The operating system version. (example: 10.0.0) |
serial_number | string | The device serial number. (example: EXAMPLEHMD6R) |
tunnel_type | string | Type of the tunnel connection used. (example: masque) |
updated | string (date-time) | When the device was updated. (example: 2017-06-14T00:00:00Z) |
user | object | |
version | string | The WARP client version. (example: 1.0.0) |
List devices response.
| Name | Datatype | Description |
|---|---|---|
id | string | Registration ID. Equal to Device ID except for accounts which enabled multi-user mode. (example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415) |
name | string | The device name. (example: My mobile device) |
os_distro_name | string | The Linux distro name. (example: ubuntu) |
created | string (date-time) | When the device was created. (example: 2017-06-14T00:00:00Z) |
deleted | boolean | True if the device was deleted. |
device_type | string | (windows, mac, linux, android, ios, chromeos) (example: windows) |
ip | string | IPv4 or IPv6 address. (example: 1.1.1.1) |
key | string | The device's public key. (example: yek0SUYoOQ10vMGsIYAevozXUQpQtNFJFfFGqER/BGc=) |
last_seen | string (date-time) | When the device last connected to Cloudflare services. (example: 2017-06-14T00:00:00Z) |
mac_address | string | The device mac address. (example: 00-00-5E-00-53-00) |
manufacturer | string | The device manufacturer name. (example: My phone corp) |
model | string | The device model name. (example: MyPhone(pro-X)) |
os_distro_revision | string | The Linux distro revision. (example: 1.0.0) |
os_version | string | The operating system version. (example: 10.0.0) |
os_version_extra | string | Additional operating system version details. For Windows, the UBR (Update Build Revision). For Mac or iOS, the Product Version Extra. For Linux, the distribution name and version. (example: (a) or 6889 or Ubuntu 24.04) |
revoked_at | string (date-time) | When the device was revoked. (example: 2017-06-14T00:00:00Z) |
serial_number | string | The device serial number. (example: EXAMPLEHMD6R) |
updated | string (date-time) | When the device was updated. (example: 2017-06-14T00:00:00Z) |
user | object | |
version | string | The WARP client version. (example: 1.0.0) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | device_id, account_id | Fetches a single WARP device. Not supported when multi-user mode is enabled for the account. Deprecated: please use one of the following endpoints instead: - GET /accounts/{account_id}/devices/physical-devices/{device_id} - GET /accounts/{account_id}/devices/registrations/{registration_id} | |
list | select | account_id | List WARP devices. Not supported when multi-user mode is enabled for the account. Deprecated: please use one of the following endpoints instead: - GET /accounts/{account_id}/devices/physical-devices - GET /accounts/{account_id}/devices/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. |
device_id | string |
SELECT examples
- get
- list
Fetches a single WARP device. Not supported when multi-user mode is enabled for the account. Deprecated: please use one of the following endpoints instead: - GET /accounts/{account_id}/devices/physical-devices/{device_id} - GET /accounts/{account_id}/devices/registrations/{registration_id}
SELECT
id,
name,
gateway_device_id,
account,
created,
deleted,
device_type,
ip,
key,
key_type,
last_seen,
mac_address,
model,
os_version,
serial_number,
tunnel_type,
updated,
user,
version
FROM cloudflare.zero_trust.accounts_devices
WHERE device_id = '{{ device_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;
List WARP devices. Not supported when multi-user mode is enabled for the account. Deprecated: please use one of the following endpoints instead: - GET /accounts/{account_id}/devices/physical-devices - GET /accounts/{account_id}/devices/registrations
SELECT
id,
name,
os_distro_name,
created,
deleted,
device_type,
ip,
key,
last_seen,
mac_address,
manufacturer,
model,
os_distro_revision,
os_version,
os_version_extra,
revoked_at,
serial_number,
updated,
user,
version
FROM cloudflare.zero_trust.accounts_devices
WHERE account_id = '{{ account_id }}' -- required
;