Skip to main content

Load previously saved settings

Use this API when a Dedicated Setting page needs to restore the configuration that was previously saved for a Device/Operation.

POST https://app.airngin.com/Api/v1.0/DeviceProject/GetDeviceSettingForDevice

Pass the temporary token from the page query string as a Bearer token. Send:

  • projectId
  • deviceSerial
  • operationId

If no setting was previously saved, the result may be null/empty. If a value exists, it is the same producer-defined value that was saved earlier. JSON is strongly recommended for interoperability.

A typical client-side request pattern is:

$.ajax({
url: 'https://app.airngin.com/api/v1.0/DeviceProject/GetDeviceSettingForDevice',
method: 'POST',
contentType: 'application/x-www-form-urlencoded',
headers: {'Authorization': `Bearer ${token}`},
data: $.param({projectId, deviceSerial, operationId}),
success: function(r) {
if (r && r.isSuccess && r.data) {
const savedSetting = JSON.parse(r.data.value || '{}');
// render savedSetting in your UI
}
}
});