Devices

Register New Devices

Register one or more devices to your organization.

Required Scope: write-devices

Overview

This endpoint supports bulk device registration with specified encryption mode, and custom naming and tagging.

Device Encryption Modes

Set Key Length

Set encryption key length to match your device firmware's encryption library requirement:

  • 256-bit key (32 bytes): set encryption to "AES-256-CTR"
  • 128-bit key (16 bytes): set encryption to "AES-128-CTR"
  • 128-bit key, IN100 protocol (16 bytes): set encryption to "AES-128-EAX"

Set Counter Source for EID Rotation

The Hubble Device SDK rotates through ephemeral IDs (EID) so that devices are anonymous on the network. Specify the counter_source based on your hardware capabilities:

  • Use "UNIX_TIME" for time-based encryption, e.g. for devices with a real time clock (RTC). This is the default value.
  • Use "DEVICE_UPTIME" for timeless encryption, e.g. using the device uptime counter to rotate EIDs.

Set EID Rotation Period (AES-128-EAX only)

For the IN100 protocol (encryption of "AES-128-EAX"), you may optionally override the EID rotation period with eid_rotation.period_exponent: the base-2 exponent of the rotation period in seconds (matches the IN100 configuration field). Must be between 10 and 15 inclusive. The period defaults to period_exponent: 15, corresponding to 32,768 seconds (~9 hours).

Device Metadata

You can optionally provide names and tags for each device being provisioned:

  • names: An array of device names.
  • tags: An array of device tags.

Device Key

By default device.key is returned encoded in standard Base64 format, and is automatically compatible with the Hubble Device SDK. Pass key_format=hex to receive device.key as a lowercase hexadecimal string instead.

post/v2/org/{org_id}/devices

Request

  • Base URL: https://api.hubble.com
  • URL: https://api.hubble.com/v2/org/{org_id}/devices
  • Auth: HTTP bearer

Path parameters

org_idstring uuid required

The ID for an organization

Your organization ID

Query parameters

key_format'base64' | 'hex'

Encoding for device.key in the response. base64 (default) returns standard Base64; hex returns a lowercase hexadecimal string.

Headers

Content-Typestring

An indication that the payload is JSON

Request body

n_devicesinteger

Number of devices to provision

encryption'AES-256-CTR' | 'AES-128-CTR' | 'AES-128-EAX' | 'NONE' required

Encryption mode configured for the device at registration.

namesDeviceName[]

Optional array of device names. If provided, the length must match the number of devices being provisioned.

tagsDeviceTags[]

Optional array of tag maps for each device. If provided, the length must match the number of devices being provisioned.

Example request

{
  "n_devices": 1,
  "encryption": "AES-256-CTR",
  "names": [
    "my-device"
  ]
}

Response

Devices provisioned

Example response

{
  "devices": [
    {
      "tags": {
        "_env": "production"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.