Managing device list through API

The unique appkeys associated with end-device deveui’s can be managed through the Conduit AEP API.
Below are several examples of operations for managing the list.

Notes:

  • Changes to the devices list must be saved in order to persist across power cycle
  • The network server must be restarted to load the new list

Enable whitelist join server Local Keys instead of Cloud Key Store

curl 127.0.0.1/api/loraNetwork/whitelist -X PUT --data '{"enabled":true}' -H "Content-Type: application/json"

Bulk upload or replace the entire list

curl 127.0.0.1/api/loraNetwork/whitelist -X PUT --data '{"devices":[{"deveui":"0001223344556677","appeui":"0011223344556677","appkey":"00112233445566770011223344556677"},{"deveui":"0011223344556677","appeui":"0011223344556677","appkey":"00112233445566770011223344556677"}]}' -H "Content-Type: application/json"

Device and Network Profiles can also be set.

"device_profile_id" : "LW102-OTA-US915"
"network_profile_id" : "DEFAULT-CLASS-A"

Save API changes

curl 127.0.0.1/api/command/save -X POST --data ""

Restart Network Server

curl 127.0.0.1/api/lora/restart -X POST --data ""

Remove all end-devices

curl 127.0.0.1/api/loraNetwork/whitelist/devices -X DELETE

Remove one end-device at index 0

curl 127.0.0.1/api/loraNetwork/whitelist/devices/0 -X DELETE

Add a device to end of list

curl 127.0.0.1/api/loraNetwork/whitelist/devices -X POST --data '{"deveui":"0001223344556677","class":"A","appeui":"0011223344556677","appkey":"00112233445566770011223344556677"}' -H "Content-Type: application/json"

Edit a device at index 0

curl 127.0.0.1/api/loraNetwork/whitelist/devices/0 -X PUT --data '{"deveui":"0001223344556677","class":"A","appeui":"0011223344556677","appkey":"00112233445566770011223344556677"}' -H "Content-Type: application/json"