Skip to main content

Cloud database for Devices

AirNgin provides a simple cloud key/value storage API for Device data that should survive local memory loss or hardware replacement scenarios.

The source contract allows a small number of records per Device and is intended for compact product state rather than bulk telemetry storage.

Store or update a record​

Key is the producer-defined identifier for the stored value. The current API contract limits the key to 20 characters and expects English letters/numbers.

POST https://app.airngin.com/api/v1.0/DeviceCloud/AddNewData
Content-Type: application/x-www-form-urlencoded

Fields:

FieldTypeMeaning
UsernameStringMQTT username issued to the Device
PasswordStringMQTT password issued to the Device
DeviceSerialStringAirNgin DeviceSerial
ProjectCodeStringProject code
KeyStringRecord key
ValueStringValue to store; JSON is allowed

Calling AddNewData again with the same key updates the existing value.

Read a record​

POST https://app.airngin.com/api/v1.0/DeviceCloud/GetDeviceCloud

Send the same authentication/identity fields plus Key.

Delete a record​

DELETE https://app.airngin.com/api/v1.0/DeviceCloud/DeleteData

The delete endpoint receives the identity/key fields from the query string according to the current contract.

Validation codes documented by the current API​

CodeMeaning
8031069Username is required
8031070Password is required
8031008DeviceSerial is required
8031071DeviceSerial must match the required 14-character format
8031007ProjectCode is required
8031065ProjectCode must match the required platform length
8031072Key is required
8031074Key cannot exceed 20 characters
8031075Key may contain only English letters and digits