Zum Inhalt springen
Web APIAnalytics

Analytics

Aggregated views over pings, devices and geofences — activity, density, occupancy, dwell time and processing latency.

8 operationsBase https://api.staging.locantra.de

Summarise how recently assets were seen

GEThttps://api.staging.locantra.de/analytics/assets/current
Permission pings.read

Counts the transponders of your organisation seen in the window by how recently they last reported: within five minutes, fifteen minutes, an hour, a day, and the ones stale beyond that or last seen without a usable position. From and To bound the window and default to the last 24 hours; it may not span more than 31 days. GroupBy splits the result into one row per value of that dimension, returned as Group; without it the result is a single ungrouped series. OrderCategory, OrderTag, AssignmentCategory and AssignmentTag narrow the result to the orders or transponder assignments carrying those organisation-defined classifications, and order_category, order_tag, assignment_category and assignment_tag break it down by them; a classification breakdown covers only the orders or assignments that carry one, and an entity with several tags is counted in each of its tag groups.

Snapshot the fleet's health

GEThttps://api.staging.locantra.de/analytics/devices/health
Permission devices.status.readTier Plus

Rolls up the latest status of every device of your organisation: how many are online (reported within your organisation's online window, setting devices.online_window, default 30 minutes), and how many report a low battery, a high temperature, a weak signal or an error. The thresholds those counts use are yours to set. This is a snapshot of the present, not a window. Set IncludeDevices to add the per-device rows, which are paged with Limit (default 100, maximum 1000) and Offset; the response envelope's Page then carries the applied Limit and the Total device count, while Summary always covers the whole fleet.

Count moves from one geofence to another

GEThttps://api.staging.locantra.de/analytics/geofences/flows
Permission geofences.read

Counts how often the transponders of your organisation moved from one geofence to another in the window, busiest pair first. A move is two consecutive geofence entries of one transponder into two different geofences; exits are not read, so re-entering the same geofence is no move, overlapping geofences each count their own entry, and a synthetic exit (marked Synthetic on /geofence/events) neither adds nor breaks one. Both entries must fall inside the window, which is compared as instants (every timestamp is UTC). OrderID narrows the entries the moves are read from to the transponders assigned to those orders. GeoFenceID then keeps the moves that start or end in one of those geofences, so a single geofence shows both where transponders came from and where they went; it does not shorten the sequence, so a transponder that went A, X, B counts A to X and X to B, never A to B. Each end carries the geofence's current name; a geofence deleted since carries the name stored with its entries in the window, and the name is absent when neither is known. From and To bound the window and default to the last 24 hours; it may not span more than 31 days. The result is one row per pair of geofences, bounded by the window rather than paged.

Count what is currently inside each geofence

GEThttps://api.staging.locantra.de/analytics/geofences/occupancy
Permission pings.readTier Plus

Reports, per geofence of your organisation, how many transponders are inside it right now and how many orders they belong to. Occupancy is read from each transponder's last ping, so a transponder that stopped reporting stays where it was last seen, and one currently outside every geofence is not counted. This is a snapshot of the present, not a window. Each count is split into present and stale: a transponder is present when its last ping lies within the organisation's presence window (setting geofences.presence_window, default 30 minutes, the edge included), and stale when it is older. CurrentlyInside is PresentTransponders + StaleTransponders; an order is present when any of its transponders in the geofence is, so UniqueOrders is PresentOrders + StaleOrders. Results are paged with Limit (default 100, maximum 1000) and Offset; the response envelope's Page carries the applied Limit and the Total geofence count.

Summarise geofence crossings and dwell times

GEThttps://api.staging.locantra.de/analytics/geofences/summary
Permission geofences.read

Counts the geofence entries and exits of your organisation in the window, with how many transponders and orders crossed and how long they stayed. The dwell figures leave out synthetic exits (exits whose crossing was not observed, marked Synthetic on /geofence/events); Exits still counts them. TransponderID filters by the chip codes printed on the transponders, not by assignment IDs, and Edge narrows the result to one crossing direction. From and To bound the window and default to the last 24 hours; it may not span more than 31 days. GroupBy splits the result into one row per value of that dimension, returned as Group; without it the result is a single ungrouped series. This operation groups by geofence, device or order, or by an order classification, only. OrderCategory and OrderTag narrow the result to the orders carrying those organisation-defined classifications, and order_category / order_tag break it down by them; the transitions carry no transponder assignment, so the assignment classifications are not available here. The result is bounded by the window and its buckets rather than paged.

Report ping activity per hour

GEThttps://api.staging.locantra.de/analytics/pings/activity
Permission pings.readTier Plus

Reports how many pings your organisation recorded per hour, with how many transponders, orders and devices were behind them and how many pings fell inside a geofence or carried no usable position. From and To bound the window and default to the last 24 hours; it may not span more than 31 days. GroupBy splits the result into one row per value of that dimension, returned as Group; without it the result is a single ungrouped series. OrderCategory, OrderTag, AssignmentCategory and AssignmentTag narrow the result to the orders or transponder assignments carrying those organisation-defined classifications, and order_category, order_tag, assignment_category and assignment_tag break it down by them; a classification breakdown covers only the orders or assignments that carry one, and an entity with several tags is counted in each of its tag groups. The result is bounded by the window and its buckets rather than paged. Buckets are UTC hours: a point covers the UTC hour that starts at its Bucket, whatever your timezone, and the window takes every bucket from the start of From's UTC hour up to, not including, To.

Map ping density onto geo cells

GEThttps://api.staging.locantra.de/analytics/pings/density
Permission pings.readTier Plus

Counts the processed pings of your organisation per geo cell, for a heat map. Cell picks the index — geohash, h3 or s2 — and Precision the geohash prefix length. From and To bound the window and default to the last 24 hours; unlike the other analytics operations it may not span more than 7 days. The result is bounded by the window and its buckets rather than paged.

Report ping processing latency per hour

GEThttps://api.staging.locantra.de/analytics/pings/processing
Permission pings.readTier Plus

Reports how long the platform took to process your organisation's pings per hour, as the median, 90th and 99th percentile of both the processing itself and the whole path from receiving a ping to finishing it. From and To bound the window and default to the last 24 hours; it may not span more than 31 days. GroupBy splits the result into one row per value of that dimension, returned as Group; without it the result is a single ungrouped series. OrderCategory, OrderTag, AssignmentCategory and AssignmentTag narrow the result to the orders or transponder assignments carrying those organisation-defined classifications, and order_category, order_tag, assignment_category and assignment_tag break it down by them; a classification breakdown covers only the orders or assignments that carry one, and an entity with several tags is counted in each of its tag groups. The result is bounded by the window and its buckets rather than paged. Buckets are UTC hours: a point covers the UTC hour that starts at its Bucket, whatever your timezone, and the window takes every bucket from the start of From's UTC hour up to, not including, To.