Api\DeviceController

api/devices/multiple POST Store/update multiple Devices in an array of Device objects

post/api/devices/multiple

Headers

Authorizationstring
Content-Typestring
Acceptstring
Accept-languagestring

Request body

idinteger

Device id to update. (Required without key and hardware_id)

keystring

DEV EUI of the sensor to enable storing sensor data incoming on the api/sensors or api/lora_sensors endpoint. (Required without id and hardware_id)

hardware_idstring

Hardware id of the device as device name in TTN. (Required without id and key)

namestring

Device name

hive_idinteger

Hive that the sensor is measuring. Default: null

typestring

Category name of the hive type from the Categories table. Default: beep

last_message_receivedstring

Will be converted with date('Y-m-d H:i:s', $last_message_received); before storing

firmware_versionstring

Firmware version of the Device

hardware_versionstring

Hardware version of the Device

boot_countinteger

Amount of boots of the Device

measurement_interval_minnumber

Measurement interval in minutes

measurement_transmission_rationumber

Measurements ratio of non-transmitted vs transmitted messages. If 0 or 1, every measurement gets transmitted.

ble_pinstring

Bleutooth PIN of Device: 6 numbers between 0-9

battery_voltagenumber

Last measured battery voltage

next_downlink_messagestring

Hex string to send via downlink at next connection (LoRaWAN port 6)

last_downlink_resultstring

Result received from BEEP base after downlink message (LoRaWAN port 5)

Example request

{
  "id": 14,
  "key": "maxime",
  "hardware_id": "illo",
  "name": "aspernatur",
  "hive_id": 14,
  "type": "dolorem",
  "last_message_received": "nihil",
  "firmware_version": "quis",
  "hardware_version": "iusto",
  "boot_count": 5,
  "measurement_interval_min": 607777.889946,
  "measurement_transmission_ratio": 1299410.2443,
  "ble_pin": "omnis",
  "battery_voltage": 2556730.0049182,
  "next_downlink_message": "rem",
  "last_downlink_result": "deserunt"
}

Changes