Retrieve Packets
GET/v1/org/:org_id/packets
Stream or query packets for your organization.
Required Scope: read-packets
Overview
This endpoint acts as a data stream. Use the Continuation-Token to track your consumer's position in the stream and ingest incrementally.
Packets are returned in ascending order based on when they were detected by Hubble Network.
Pagination and Streaming
Use the Continuation-Token to capture new packets incrementally.
If provided, all other query parameters are ignored, as the token persists the initial query's configuration.
Response Headers
Continuation-Token: an opaque cursor for your position in the stream. The max page size is 1,000 packets.- If you supplied an
endtime, an empty string indicates you have reached that end time and there is no more data in the requested window. - If you left
endopen, the token never goes empty, since the stream has no end to reach — it always points at your current position, whether or not new packets are waiting there.
- If you supplied an
Retry-After: the recommended number of seconds to wait before your next poll request (max value is 300 seconds). This is the signal to watch on an open stream: its presence means you are caught up to the live edge, so treat it as your polling backoff rather than looking for an emptyContinuation-Token.
Query Parameters (Initial Request)
When starting a new stream (no Continuation-Token exists) or to query for data from a period of time, use these parameters to begin polling:
Time Period (UTC, in seconds)
starttime defaults to 7 days ago when not specified.- Omit
endtime to leave the stream open and poll for new packets indefinitely. - Supply an
endtime if your consumer needs a terminating, empty-token stop condition.
Granular packet data is available up to 30 days in the past.
Device Filtering
- When
device_idis provided, only packets from that device will be returned. - Note: you cannot page indefinitely for single-device queries. The stream closes when it reaches current time.
Device filtering is provided for troubleshooting. It should not be used for high-volume data retrieval.
Packet Data Definitions (Response)
Location Object
For TERRESTRIAL packets, all location fields represent the scanning gateway's most recent GPS lock:
location.timestampis the timestamp of the location lock.location.latitudeandlocation.longitudeare the location coordinates.location.horizontal_accuracyandlocation.vertical_accuracyrepresent accuracy variance in meters.
For SATELLITE packets, location.timestamp and device.timestamp are identical: both represent the time the packet was detected by the satellite.
Device Object
For TERRESTRIAL packets,
device.timestampis the timestamp when the data packet was detected by the gateway.device.rssiis the received signal strength measured by the gateway.
Gateway Object
For self-provided packets (packets your organization contributed and is also reading back, i.e. provider_id == org_id), the response optionally includes a top-level gateway object. These fields describe the scanning gateway that received the BLE advertisement.
gateway.gateway_idis the stable gateway UUID issued by Hubble when you register using the Gateway API.gateway.service_idis the normalized 16-bit service UUID from the scanned BLE advertisement (e.g.fca6).
The gateway block is omitted entirely for packets sourced from a different organization (e.g. third-party crowdsourced traffic), and is also omitted on self-provided packets when no gateway context was attached at ingest.
Request
Responses
- 200
- 400
- 429
- 500
A page of packets. When the stream has caught up to the present and there is
nothing new to return, this still responds 200 with an empty packets array
and a Retry-After header — poll again after that many seconds rather than
immediately retrying, since immediate retries in this state stay empty.
Response Headers
A token to indicate how to continue paging
The number of seconds to wait before polling again. Only meaningful when the response is an empty page (the stream has no new packets yet): the most recent data has already been retrieved, so this is a suggestion to pause longer between queries rather than poll continuously. Omitted when the page contains packets.
Bad Request
An error when too many requests have been made to retrieve packets
Response Headers
A token to indicate how to continue paging
Internal Server Error