Skip to main content
The Fleet Devices resource allows you to register, update, and manage devices in your fleet.

List devices

Retrieve a paginated list of fleet devices.
const devices = await client.fleet.devices.list(options?);

Parameters

options
ListDevicesOptions
Optional filtering and pagination parameters
status
string
Filter devices by status (e.g., ‘online’, ‘offline’, ‘maintenance’)
type
string
Filter devices by type
limit
number
Maximum number of devices to return per page
cursor
string
Cursor for pagination

Returns

items
FleetDevice[]
Array of fleet devices
uid
string
Unique identifier for the device
name
string
Device name
type
string | null
Device type
status
string | null
Current device status
tags
string[]
Device tags
firmwareVersion
string | null
Current firmware version
metadata
Record<string, unknown> | null
Custom device metadata
lastSeenAt
string | null
Timestamp when device was last seen
deviceToken
string | null
Authentication token for the device
createdAt
string | null
Creation timestamp
updatedAt
string | null
Last update timestamp
nextCursor
string | null
Cursor for the next page of results
previousCursor
string | null
Cursor for the previous page of results
hasMore
boolean
Whether more results are available

Register device

Register a new device to your fleet.
const device = await client.fleet.devices.register(options);

Parameters

options
RegisterDeviceOptions
required
Device registration details
name
string
required
Device name
type
string
required
Device type
firmwareVersion
string
Firmware version
tags
string[]
Device tags for categorization
metadata
Record<string, unknown>
Custom device metadata

Returns

FleetDevice
object
The newly registered device

Get device

Retrieve a specific device by UID.
const device = await client.fleet.devices.get(uid);

Parameters

uid
string
required
The unique identifier of the device

Returns

FleetDevice
object
The requested device

Update device

Update an existing device.
const device = await client.fleet.devices.update(uid, options);

Parameters

uid
string
required
The unique identifier of the device
options
UpdateDeviceOptions
required
Fields to update
name
string
Updated device name
status
string
Updated device status
firmwareVersion
string
Updated firmware version
tags
string[]
Updated device tags
metadata
Record<string, unknown>
Updated custom metadata

Returns

FleetDevice
object
The updated device

Delete device

Delete a device from your fleet.
await client.fleet.devices.delete(uid);

Parameters

uid
string
required
The unique identifier of the device to delete

Returns

Returns void on success.

Build docs developers (and LLMs) love