Skip to main content
For the complete documentation index, see llms.txt.

Hubble Network developer documentation: integrate Bluetooth devices with terrestrial and satellite connectivity.

Gateway API

External API gateway for the Hubble Network cloud platform. Receives BLE scan packets, gateway registrations, and debug logs from the crowdsourced BLE listening network.

Gateway management​

This API is for gateway devices. To manage your organization's gateways, use the Cloud API at https://api.hubble.com. The Cloud API lists gateways and gateway groups, and creates, revokes and reactivates gateway groups.

Design Principles​

  • Queue-and-acknowledge: The packets, logs, and locations endpoints queue payloads and return immediately (202). Deduplication is synchronous (per-device batchId check); anomaly detection and downstream processing happen asynchronously.
  • Idempotency: Every upload request includes a batchId (UUID). Duplicate submissions within a 24-hour window (scoped per gateway) return the same 202 response without re-processing.
  • Additive evolution: New fields may be added to requests and responses without a version bump. Clients MUST ignore unknown fields. Removing or renaming fields requires /v2/.
  • Clock skew detection: All non-GET requests include sentAtMillis (gateway clock at send time). The backend computes skew by comparing to its own receive time and can adjust client-supplied timestamps during processing.

Authentication​

The API uses a two-phase authentication flow:

  1. Device registration (first launch): The SDK sends a PUT /api/v1/gateways request with the Gateway Group ID in the X-Sdk-Key header (a public, non-secret identifier for the gateway group). The server assigns a gatewayId and returns per-device credentials (deviceToken + refreshToken).

  2. Authenticated requests (ongoing): All subsequent requests use an Authorization: Bearer {deviceToken} header. The deviceToken is short-lived; when it expires, the SDK refreshes it via POST /api/v1/auth/refresh.

Rate Limiting​

Every endpoint except the health and readiness probes is rate limited. When a limit is exceeded the server returns 429 with error code rate_limited and retryable: true. Back off as described under Retries.

Retries​

Retry a failed request only when the error body has retryable: true, and back off exponentially between attempts: no server response carries a Retry-After header or a wait time, so the schedule is the client's. Start at no less than a few seconds, double on each consecutive failure of the same request, add jitter so a fleet of devices does not retry in lockstep, and cap the delay. A 429 and a retryable 503 are both answered this way. When retrying an upload, resend it with the same batchId (see Idempotency).

Content Type​

All request bodies MUST use Content-Type: application/json. A malformed or non-JSON body is rejected with 400 invalid_payload — there is no separate media-type error.

Compression​

Requests MAY be sent with Content-Encoding: gzip. When present, the server decompresses the request body before processing. Uncompressed requests are also accepted.

Batch Limits​

EndpointMax itemsMax body (uncompressed)
Packets5000~4 MB
Logs200~1 MB
Locations500~1 MB

Exceeding the max item count for a batch is a 400 invalid_payload, not a dedicated error code.

The server reads a packets request body within 60 seconds, and other request bodies within 10 seconds. A packets body that times out gets a 503 with retryable: true. Send large packet batches with Content-Encoding: gzip: 5000 packets are about 2.3 MB uncompressed.

Authentication​

Gateway Group ID. A public, non-secret identifier for the gateway group. Used only during device registration (PUT /api/v1/gateways).

Security Scheme Type:

apiKey

Header parameter name:

X-Sdk-Key