Smart Sensing allows AirVantage users to register, configure and manage LoRaWAN devices from different vendors keeping consistency with AirVantage lifecycle.
This section describes a set of API in AirVantage dedicated to Smart Sensing to extend standard AirVantage API capability for LoRaWAN devices.
/api/v1/operations/lorasystems/provision
Provision Lora systems from a CSV file.
During provisioning, the LoRaWAN device identifier (DevEUI) is associated with its LoRaWAN AppKey. The AppKey is a device lifetime secret key and typically provided by the manufacturer or distributor. It is used as a pre shared key for the LoRaWAN 1.0.x link layer protocol. The Registration Code (REGCODE) is a short token which can be chosen at will during provisioning and must be provided during registration to proof the ownership of the device identity.
Note: The Provision API does not create a System in your Airvantage account and cannot be chained with other operations. Provisioning records cannot be deleted or modified. Provisioning is a prerequisite for registration.
See the CSV Header Section for more details about the CSV expected contents.
Request
POST https://eu.airvantage.net/api/v1/operations/lorasystems/provision
Content-Disposition: form-data; name="file"; filename="file.csv"
Content-Type: text/csv
// CSV attached
Response
200 OK
HTTP/1.1 200 OK
Content-Type: application/json
...
{
"operation":"4b89657f63aac4b299c1d46e98a495326"
}
Name |
Description |
Use |
Default |
Type |
company |
Set the context company. |
optional |
caller's company |
uid |
Name |
Description |
lora.system.deveui.missing |
DEVEUI is missing |
lora.system.deveui.too.long |
DEVEUI length > 16 characters |
lora.system.deveui.invalid |
DEVEUI is not a Hex String |
lora.system.app.key.missing |
APPKEY is missing |
lora.system.app.key.too.long |
APPKEY length > 32 characters |
lora.system.app.key.invalid |
APPKEY is not a Hex String |
lora.system.reg.code.missing |
REGCODE is missing |
lora.system.reg.code.too.long |
REGCODE length > 8 characters |
HTTP Method |
POST |
Requires Authentication |
Yes |
Rate Limited |
Yes |
Headers |
Content-type: text/csv |
Permissions |
entities.systems.lora.provision |
/api/v1/operations/lorasystems/register
Register Lora systems from a CSV file.
During registration, a LoRaWAN device is added to the System inventory of the caller's AirVantage company. The device identity must previously been provisioned using the Provision API and the Registration Code (REGCODE) must match.
See the CSV Header Section for more details about the CSV expected contents.
Request
POST https://eu.airvantage.net/api/v1/operations/lorasystems/register
Content-Disposition: form-data; name="file"; filename="file.csv"
Content-Type: text/csv
// CSV attached
Response
200 OK
HTTP/1.1 200 OK
Content-Type: application/json
...
{
"operation":"4b89657f63aac4b299c1d46e98a495326"
}
Name |
Description |
Use |
Default |
Type |
company |
Set the context company. |
optional |
caller's company |
uid |
Name |
Description |
lora.system.deveui.missing |
DEVEUI is missing |
lora.system.deveui.too.long |
DEVEUI length > 16 characters |
lora.system.deveui.invalid |
DEVEUI is not a Hex String |
lora.system.joineui.too.long |
JOINEUI length > 16 characters |
lora.system.joineui.invalid |
JOINEUI is not a Hex String |
lora.system.reg.code.missing |
REGCODE is missing |
lora.system.reg.code.too.long |
REGCODE length > 8 characters |
lora.system.make.model.missing |
MAKEMODEL is missing |
lora.system.make.model.too.long |
MAKEMODEL length > 256 characters |
HTTP Method |
POST |
Requires Authentication |
Yes |
Rate Limited |
Yes |
Headers |
Content-type: text/csv |
Permissions |
entities.systems.lora.register |