Flow Logs
Flow Logs are metadata-only network flow records generated by devices across emnify’s mobile core. You can access them through the emnify Portal, the REST API, and the Data Streamer.
This page documents the REST API representation of Flow Logs.
For the streaming event schema delivered by the Data Streamer (the flow_start, flow_update, and flow_end records), see Network Flow Logs.
Flow Logs are a subscribable enterprise service that must be enabled for your organization.
Requests return 403 Forbidden if the feature isn’t enabled or you lack permission.
The REST API exposes Flow Logs for a single device through two endpoints:
Both endpoints share the same conventions:
- Time window: results default to the last hour. Use
started_from(and the other time bounds) to widen it, up to a maximum look-back of 30 days. - Filtering: use the
q=<field>:<criteria>syntax. Combine multiple values for one field with||, and combine different fields with,. - Sorting: use
sort=<operator><field>, where-is descending and+(or no operator) is ascending. Separate multiple sort fields with,. Both endpoints default to-started_on. - Pagination: use
page(starts at 1) andper_page. Responses include theX-page,X-per-page,X-pages,X-count,X-Sort, andX-Filterheaders.
Flow Logs by destination
Returns flow activity for a device aggregated by the combination of destination hostname, destination IP, destination port, and protocol.
- Filter fields:
destination_hostname,destination_ip,destination_port,protocol,started_from,started_until,completed_from,completed_until. - Sort fields:
destination_hostname,destination_ip,destination_port,protocol,started_on,completed_on,bytes_up,bytes_down. per_page: maximum 100 (default 25).
Example response
Flow Log detail
Returns individual (non-aggregated) flow rows. This is the data behind a device’s Flow Log details in the Portal.
- Filter fields:
destination_hostname,destination_ip,destination_port,protocol,flow_id,event_type,started_from,started_until,completed_from,completed_until. - Sort fields:
started_on,completed_on,destination_hostname,destination_ip,destination_port,protocol,bytes_up,bytes_down. per_page: maximum 1000 (default 25).
Example response
Protocol values
The protocol field is the symbolic name for the flow’s IANA protocol number.
Numbers without a mapping are returned as PROTO_<n> so no information is lost.