How format http get request for datapoints with conditions?

I am having trouble pulling individual datapoints using http get with conditions. Bottom line is the condition always evaluates to “true” and I get the whole stream contents. The size option works fine just not the condition option. Had success with this several years ago, but maybe I’m not holding my mouth right now.

Here’s my query that I am entering in mozilla browser:

http://my.idigi.com/ws/DataPoint/dia/channel/00000000-00000000-00409DFF-FF4537BA/XBee_408A8A7B/AD1?condition=serverTimestampISO>‘2015-08-30T20:46:56.927Z’

The following query for diachannelFull works fine with conditions.

http://my.idigi.com/ws/DiaChannelDataFull?condition=dcdStringValue<‘272’

Reread idigi docs a hundred times - at least.

Thanks, Steve

PS - maybe there’s an easier way to find the last datapoints in a stream. Any suggestions would be appreciated.

You might want to try startTime and endTime. For example:

http://devicecloud.digi.com/ws/DataPoint/dia/channel/00000000-00000000-00409DFF-FF4537BA/XBee_408A8A7B/AD1?startTime=2015-08-31T06:00:00.000Z&endTime=2015-08-31T06:05:00.000Z

1 Like

This worked fine…thanks! I wish the idigi documentation was a little more clear with examples like when to put text in quotes.

For example in the idigi documentation for “Get files based on conditions” idigi shows the example:

GET /ws/FileData?condition=fdType=‘file’ and fdLastModifiedDate>‘2013-12-06T14:50:00.000Z’

You would think this same logic would apply to datapoints but it didn’t work for me.

Thanks again!