v1

latestOpenAPI 3.0.32026-07-171140286.6 KB
Api\DeviceController

api/devices PUT/PATCH Update an existing Device

put/api/devices/{id}

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

Name of the sensor

hive_idinteger

Hive that the sensor is measuring. Default: null

typestring

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

deleteboolean

If true delete the sensor and all it's data in the Influx database

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": 12,
  "key": "quis",
  "hardware_id": "ea",
  "name": "tenetur",
  "hive_id": 2,
  "type": "veritatis",
  "last_message_received": "nihil",
  "firmware_version": "porro",
  "hardware_version": "fugit",
  "boot_count": 7,
  "measurement_interval_min": 66723158.672448,
  "measurement_transmission_ratio": 222015999.57199,
  "ble_pin": "distinctio",
  "battery_voltage": 64171328.7,
  "next_downlink_message": "voluptas",
  "last_downlink_result": "incidunt"
}