Getting a List of Datapoints

Getting a List of Datapoints

You can get a list of datapoints on a device or set of devices managed by the IzoT Server with an IzoT REST datapoints resource. You can get all datapoints, datapoints meeting specific search criteria, datapoints on a device, datapoints on a device meeting specific search criteria, datapoints on a device where a particular field contains a specified value, or a single datapoint.

For each datapoint, the IzoT Server returns the following properties:

Property

Description

id

Unique identifier for the datapoint

url

Datapoint address

name

Datapoint name

value

Current value of the datapoint

notes

Datapoint comment

device

Parent device that contains the datapoint

timestamp

UTC time when the value was last written (updated)

Optional query parameters are as follows:

Parameter

Description

Parameter

Description

ref_type = (url | id)

By default, the url field is an address, but if you change the ref_type, the url field will contain a unique primary key.

search = {search_text}

Search across several text-related fields for a partial case-insensitive match. Multiple searches may be specified.

{field_name} = {field_value}

Search the specified field name for an exact case-sensitive match with {field_value}. Multiple matches may be specified.

Examples

Get all datapoints for device 2:

http://[hostname]/api/devices/2/datapoints/

Get all datapoints for all devices on the network:

http://[hostname]/api/datapoints/

Get datapoint 3:

http://[hostname]/api/datapoints/3/

Get all datapoints that currently have the value equal to off:

http://[hostname]/api/datapoints/?value=off