How can I get historical positions of Tag?

You are here:
  • FAQ
  • API
  • How can I get historical positions of Tag?

There is two possibilities how to obtain historical positions of the Tag.

  • REST API
  • SAGE API

REST API – provide last 100 datapoints of datastream, per selected time range. Datastream can be posX, posY or different available datasream posZ, barometer, mag, etc. Example how results looks like and all available datasreams are listed in Application note: API Guide.

Expected date format: D M d Y H:i:s e + , e.g. “Thu Oct 03 2013 07:03:41 GMT+0200 (Central Europe Standard Time)”.

However datasreams posX and posY are present as separated datasreams within the output. So programmer need to merge them based on timestamps.

From RTLS Studio 1.6.0 there is an additional query in SAGE API to make it easier:

SAGE API – provide all possible historical positions. There is possibility to obtain only positions per Tag ID. It can be fetched to pages if there are more positions then maximum per page. Maximum positions per page is 10000 (do not change this parameter). Verbose will show clr, number of used anchors for calculation and plan ID of the position. It is also possible to change time range of data.

Expected date format: YYYY-MM-DDThh:mm:ss.sZ, e.g. “1970-01-01T00:00:01.123Z” or “1970-01-01 00:00:01.123”

http://[SEVER IP]/sageserver/positions?id=[FEED ID]&per_page=10000&page=[PAGE NUMBER]&verbose=[BOOLEAN]&from=[TIME]&to=[TIME]

Example:

http://192.168.225.2/sageserver/positions?id=48&per_page=10000&page=1&verbose=true&from=1970-01-01%2000%3A00%3A01&to=2038-01-19%2003%3A14%3A07

Results: