Skip to main content

devices

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

Overview

Namedevices
TypeResource
Iddatadog.infrastructure.devices

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe device ID (example: example:1.2.3.4)
attributesobjectThe device attributes
typestringThe type of the resource. The value should always be device.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_deviceselectdevice_id, regionGet the device details.
list_devicesselectregionpage[size], page[number], sort, filter[tag]Get the list of 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
device_idstringThe id of the device to fetch. (example: example:1.2.3.4)
regionstring(default: datadoghq.com)
filter[tag]stringFilter devices by tag. (example: status:ok)
page[number]integer (int64)Specific page number to return.
page[size]integer (int64)Size for a given page. The maximum allowed value is 100.
sortstringThe field to sort the devices by. (example: status)

SELECT examples

Get the device details.

SELECT
id,
attributes,
type
FROM datadog.infrastructure.devices
WHERE device_id = '{{ device_id }}' -- required
AND region = '{{ region }}' -- required
;