devices_physical_devices
Creates, updates, deletes, gets or lists a devices_physical_devices resource.
Overview
| Name | devices_physical_devices |
| Type | Resource |
| Id | cloudflare.zero_trust.devices_physical_devices |
Fields
The following fields are returned by SELECT queries:
- get
- list
Returns a Device.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the device. (example: fc9ab6ab-3b94-4319-9941-459462b3d73e) |
name | string | The name of the device. (example: My Device) |
hardware_id | string | A string that uniquely identifies the hardware or virtual machine (VM). |
active_registrations | integer | The number of active registrations for the device. Active registrations are those which haven't been revoked or deleted. |
client_version | string | Version of the WARP client. (example: 1.0.0) |
created_at | string | The RFC3339 timestamp when the device was created. (example: 2025-02-14T13:17:00Z) |
deleted_at | string | The RFC3339 timestamp when the device was deleted. (example: 2025-02-14T13:17:00Z) |
device_type | string | The device operating system. (example: linux) |
last_seen_at | string | The RFC3339 timestamp when the device was last seen. (example: 2025-02-14T13:17:00Z) |
last_seen_registration | object | The last seen registration for the device. |
last_seen_user | object | The last user to use the WARP device. |
mac_address | string | The device MAC address. (example: f5:01:73:cf:12:23) |
manufacturer | string | The device manufacturer. (example: ACME) |
model | string | The model name of the device. (example: Mark VII) |
os_version | string | The device operating system version number. |
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. |
public_ip | string | Deprecated: IP information is provided by DEX - see https://developers.cloudflare.com/api/resources/zero_trust/subresources/dex/subresources/fleet_status/subresources/devices/methods/list/ (example: 1.1.1.1) |
serial_number | string | The device serial number. (example: ABS765ASD8A) |
updated_at | string | The RFC3339 timestamp when the device was last updated. (example: 2025-02-14T13:17:00Z) |
Returns a list of Devices.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the device. (example: fc9ab6ab-3b94-4319-9941-459462b3d73e) |
name | string | The name of the device. (example: My Device) |
hardware_id | string | A string that uniquely identifies the hardware or virtual machine (VM). |
active_registrations | integer | The number of active registrations for the device. Active registrations are those which haven't been revoked or deleted. |
client_version | string | Version of the WARP client. (example: 1.0.0) |
created_at | string | The RFC3339 timestamp when the device was created. (example: 2025-02-14T13:17:00Z) |
deleted_at | string | The RFC3339 timestamp when the device was deleted. (example: 2025-02-14T13:17:00Z) |
device_type | string | The device operating system. (example: linux) |
last_seen_at | string | The RFC3339 timestamp when the device was last seen. (example: 2025-02-14T13:17:00Z) |
last_seen_registration | object | The last seen registration for the device. |
last_seen_user | object | The last user to use the WARP device. |
mac_address | string | The device MAC address. (example: f5:01:73:cf:12:23) |
manufacturer | string | The device manufacturer. (example: ACME) |
model | string | The model name of the device. (example: Mark VII) |
os_version | string | The device operating system version number. |
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. |
public_ip | string | Deprecated: IP information is provided by DEX - see https://developers.cloudflare.com/api/resources/zero_trust/subresources/dex/subresources/fleet_status/subresources/devices/methods/list/ (example: 1.1.1.1) |
serial_number | string | The device serial number. (example: ABS765ASD8A) |
updated_at | string | The RFC3339 timestamp when the device was last updated. (example: 2025-02-14T13:17:00Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | device_id, account_id | include | Fetches a single WARP device. |
list | select | account_id | cursor, sort_by, sort_order, last_seen_user.email, seen_after, seen_before, per_page, search, active_registrations, id, include | Lists WARP devices. |
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 | |
active_registrations | string | Include or exclude devices with active registrations. The default is "only" - return only devices with active registrations. |
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. |
id | array | Filter by a one or more device IDs. |
include | string | Comma-separated list of additional information that should be included in the device response. Supported values are: "last_seen_registration.policy". |
last_seen_user.email | string | Filter by the last seen user's email. |
per_page | integer (uint64) | The maximum number of devices to return in a single response. |
search | string | Search by device details. |
seen_after | string | Filter by the last_seen timestamp - returns only devices last seen after this timestamp. |
seen_before | string | Filter by the last_seen timestamp - returns only devices last seen before this timestamp. |
sort_by | string | The device field to order results by. |
sort_order | string | Sort direction. |
SELECT examples
- get
- list
Fetches a single WARP device.
SELECT
id,
name,
hardware_id,
active_registrations,
client_version,
created_at,
deleted_at,
device_type,
last_seen_at,
last_seen_registration,
last_seen_user,
mac_address,
manufacturer,
model,
os_version,
os_version_extra,
public_ip,
serial_number,
updated_at
FROM cloudflare.zero_trust.devices_physical_devices
WHERE device_id = '{{ device_id }}' -- required
AND account_id = '{{ account_id }}' -- required
AND include = '{{ include }}'
;
Lists WARP devices.
SELECT
id,
name,
hardware_id,
active_registrations,
client_version,
created_at,
deleted_at,
device_type,
last_seen_at,
last_seen_registration,
last_seen_user,
mac_address,
manufacturer,
model,
os_version,
os_version_extra,
public_ip,
serial_number,
updated_at
FROM cloudflare.zero_trust.devices_physical_devices
WHERE account_id = '{{ account_id }}' -- required
AND cursor = '{{ cursor }}'
AND sort_by = '{{ sort_by }}'
AND sort_order = '{{ sort_order }}'
AND last_seen_user.email = '{{ last_seen_user.email }}'
AND seen_after = '{{ seen_after }}'
AND seen_before = '{{ seen_before }}'
AND per_page = '{{ per_page }}'
AND search = '{{ search }}'
AND active_registrations = '{{ active_registrations }}'
AND id = '{{ id }}'
AND include = '{{ include }}'
;