The resources responsible for creating and managing devices
-
netField.devices.getAll(organisationId, page, deviceId, [callback])
-
netField.devices.customFields.create(deviceId, params, [callback])
-
netField.devices.customFields.get(deviceId, fieldId, [callback])
-
netField.devices.customFields.update(deviceId, fieldId, params, [callback])
-
netField.devices.customFields.delete(deviceId, fieldId, [callback])
-
netField.devices.enableDisable(deviceId, enabled, params, [callback])
Create Device
/**
* @param {object} params
* @param {function} callback optional
*/
netField.devices.create(params, [callback])
Get device by deviceId
/**
* @param {string} deviceId
* @param {function} callback optional
*/
netField.devices.get(deviceId, [callback])
Get devices by organisationId
/**
* @param {number} organisationId
* @param {number} page
* @param {number} limit
* @param {string} sortBy
* @param {string} sortOrder
* @param {function} callback optional
*/
netField.devices.getAll(organisationId, page, limit, sortBy, sortOrder, [callback])
Update device by deviceId
/**
* @param {string} deviceId
* @param {object} params
* @param {function} callback optional
*/
netField.devices.update(deviceId, params, [callback])
Delete device by deviceId
/**
* @param {string} deviceId
* @param {function} callback optional
*/
netField.devices.delete(deviceId, [callback])
Onboard a device
/**
* @param {object}
* @param {function} callback optional
*/
netField.device.onBoard(params, [callback])
Offboard a device
/**
* @param {object}
* @param {function} callback optional
*/
netField.device.offBoard(params, [callback])
Create device custom fields
/**
* @param {string} deviceId
* @param {object} params
* @param {function} callback optional
*/
netField.devices.customFields.create(deviceId, params, [callback])
Get device custom fields
/**
* @param {string} deviceId
* @param {function} callback optional
*/
netField.devices.customFields.getAll(deviceId, [callback])
Get device custom field
/**
* @param {string} deviceId
* @param {string} fieldId
* @param {function} callback optional
*/
netField.devices.customFields.get(deviceId, fieldId, [callback])
Update device custom field
/**
* @param {string} deviceId
* @param {string} fieldId
* @param {object} params
* @param {function} callback optional
*/
netField.devices.customFields.update(deviceId, fieldId, params, [callback])
Delete device custom field
/**
* @param {string} deviceId
* @param {string} fieldId
* @param {function} callback optional
*/
netField.devices.customFields.delete(deviceId, fieldId, [callback])
Switch device state between enabled and disabled
/**
* @param {string} deviceId
* @param {boolean} enabled
* @param {object} params
* @param {function} callback optional
*/
netField.devices.enableDisable(deviceId, enabled, params, [callback])
Confirm offboarding of your sensorEDGE device with equipmentId and offboardConfirmationCode in params
/**
* @param {object} params containing equipmentId and offboardConfirmationCode properties
* @param {function} callback optional
*/
netField.devices.customFields.offBoardConfirm(params, [callback])