Skip to main content

devices_physical_devices

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

Overview

Namedevices_physical_devices
TypeResource
Idcloudflare.zero_trust.devices_physical_devices

Fields

The following fields are returned by SELECT queries:

Returns a Device.

NameDatatypeDescription
idstringThe unique ID of the device. (example: fc9ab6ab-3b94-4319-9941-459462b3d73e)
namestringThe name of the device. (example: My Device)
hardware_idstringA string that uniquely identifies the hardware or virtual machine (VM).
active_registrationsintegerThe number of active registrations for the device. Active registrations are those which haven't been revoked or deleted.
client_versionstringVersion of the WARP client. (example: 1.0.0)
created_atstringThe RFC3339 timestamp when the device was created. (example: 2025-02-14T13:17:00Z)
deleted_atstringThe RFC3339 timestamp when the device was deleted. (example: 2025-02-14T13:17:00Z)
device_typestringThe device operating system. (example: linux)
last_seen_atstringThe RFC3339 timestamp when the device was last seen. (example: 2025-02-14T13:17:00Z)
last_seen_registrationobjectThe last seen registration for the device.
last_seen_userobjectThe last user to use the WARP device.
mac_addressstringThe device MAC address. (example: f5:01:73:cf:12:23)
manufacturerstringThe device manufacturer. (example: ACME)
modelstringThe model name of the device. (example: Mark VII)
os_versionstringThe device operating system version number.
os_version_extrastringAdditional 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_ipstringDeprecated: 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_numberstringThe device serial number. (example: ABS765ASD8A)
updated_atstringThe RFC3339 timestamp when the device was last updated. (example: 2025-02-14T13:17:00Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdevice_id, account_idincludeFetches a single WARP device.
listselectaccount_idcursor, sort_by, sort_order, last_seen_user.email, seen_after, seen_before, per_page, search, active_registrations, id, includeLists 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
device_idstring
active_registrationsstringInclude or exclude devices with active registrations. The default is "only" - return only devices with active registrations.
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.
idarrayFilter by a one or more device IDs.
includestringComma-separated list of additional information that should be included in the device response. Supported values are: "last_seen_registration.policy".
last_seen_user.emailstringFilter by the last seen user's email.
per_pageinteger (uint64)The maximum number of devices to return in a single response.
seen_afterstringFilter by the last_seen timestamp - returns only devices last seen after this timestamp.
seen_beforestringFilter by the last_seen timestamp - returns only devices last seen before this timestamp.
sort_bystringThe device field to order results by.
sort_orderstringSort direction.

SELECT examples

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 }}'
;