Many entities have Number attributes, such as lastTriggered, which represents the exact time an Event was triggered the last time, expressed in milliseconds.
Field Type: Number
Filters Available: exact , range, gt (>), gte (≥), lt (<), lte (≤), isnull
exact
Filter for an exact match of the Number
https://industrial.api.ubidots.com/api/v2.0/events/?lastTriggered=1583248038207
//Returns Array result with events exactly matching the lastTriggered
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"label": "test-event",
"lastTriggered": 1583248038207,
...
}
]
}range
Filters numbers that are in the range of the values provided.
GET https://industrial.api.ubidots.com/api/v2.0/events/?lastTriggered__range=1583248038206,1583248038208
//Returns Array 'results' with the lastTriggered value being in the range
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"lastTriggered": 1583248038207,
...
}
]
}gt [greater (or equal) than]
__gt filters for values greater than (>), __gte filters for values greater than or equal to (≥).
https://industrial.api.ubidots.com/api/v2.0/events/?lastTriggered__gt=1583248038206
//Returns Array result with events greater than (later than) 1583248038206
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"label": "test-event",
"lastTriggered": 1583248038207,
...
}
]
}
https://industrial.api.ubidots.com/api/v2.0/events/?lastTriggered__gte=1583248038207
//Returns Array result with events greater than or equal to 1583248038207
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"label": "test-event",
"lastTriggered": 1583248038207,
...
}
]
}The same logic applies anologically to __lt which filters for values less than (<) and __lte which filters for values less than or equal to (≤).
The __isnull filter can be applied to Numbers as described in the Boolean section.
