Documentation

Mistake on this page? Email us

Options to use when listing devices DeviceListOptions

Hierarchy

Index

Properties

after

after: string

The ID of the item after which to retrieve the next page

filter

filter: DeviceFilter

The device filter Filter for Device

Constructed like so:

 filter: {
   state: { $eq: "bootstrapped" },
   createdAt: { $gte: new Date("01-01-2014"), $lte: new Date("01-01-2018") },
   updatedAt: { $gte: new Date("01-01-2014"), $lte: new Date("01-01-2018") },
   customAttributes: {
     <custom_name_1>: { $eq: "custom_value_1" },
     <custom_name_2>: { $ne: "custom_value_2" }
   }
 }

Other example filters

Currently connected devices:

filter: {
    state: { $eq: "registered" }
}

Directly connected devices (not via gateways):

filter: {
    hostGateway: { $eq: "" },
    deviceType: { $eq: "" }
}

Devices connected via gateways:

filter: {
    hostGateway: { $neq: "" }
}

Gateway devices:

filter: {
    deviceType: { $eq: "MBED_GW" }
}

include

include: IncludeEnum | string | Array<IncludeEnum | string>

Optional fields to include

limit

limit: number

How many objects to retrieve in the page (Page size)

maxResults

maxResults: number

Number of results to retrieve

order

order: Order

ASC or DESC

pageSize

pageSize: number

The number of results to return in a page