Cached Data

The data passed over APIs / transport layers are always JSON formatted objects. No delimiters are used between the objects.

Our server caches a number of last received messages in a circular buffer. If you suspect some uplink messages have been missed, you can query the cache and retrieve the messages at a later point.

The response will always return newest cached records on the first page. By increasing the page number, you can access older cache records. “?” indicates an optional parameter in the message.

Query message (client to server)

{
cmd : 'cq'; // identifies type of message, cq = cache query
filter? : {
from? : number; // filter messages from this timestamp
to? : number; // filter messages up to this timestamp
EUI? : string; // filter only messages from this EUI
},
page? : number; // page indicator (one-based), default 1
perPage? : number; // results to return per page, default 100
}

Example

{
"cmd" : "cq",
"filter" : {
"from" : 1470850675433,
"EUI" : "0102030405060708",
},
"page":1,
"perPage":100
}

1x1
1x1
1x1
Response message (server to client)

{
cmd : 'cq'; // identifies type of message, cq = cache query
filter? : { // repeats query filter
from? : number;
to? : number;
EUI? : string;
},
page : number; // repeats query page
perPage : number; // repeats query perPage
total : number; // total number of matching results in cache
// use for paging through history
cache : array; // array of cached messages, ordered by descending timestamp
// format corresponds to your selected Data Format / verbosity
// if gateway information output is enabled, only 'gw' messages will be returned
}

Example

{
"cmd" : "cq",
"filter" : {
"from" : 1470850675433,
"EUI" : "0102030405060708",
},
"page":1,
"perPage":100,
"total":1,
"cache":[
{
"cmd" : "rx",
"EUI" : "0102030405060708",
"ts" : 1470850675433,
"ack" : false,
"fcnt" : 1,
"port" : 1,
"data" : "0102AABB"
}
]
}