POST api/Devices/Add
To add device
Request Information
URI Parameters
None.
Body Parameters
DevicesObject| Name | Description | Type | Additional information |
|---|---|---|---|
| ID |
For Edit mode set value otherwise set = 0 |
Object |
None. |
| ProductID |
ProductID is required |
Object |
None. |
| SerialNo |
For wifi device, SerialNo is required otherwise Set value = ""(blank) |
Object |
None. |
| IMEI |
For cellular device, IMEI is required otherwise Set value = ""(blank) |
Object |
None. |
| DevUI |
For lorawan device, IMEI is required otherwise Set value = ""(blank) |
Object |
None. |
| ICCID |
Set default value = ""(Blank) Otherwise set ICCID |
Object |
None. |
| IMSI |
Set default value = ""(Blank) Otherwise set IMSI |
Object |
None. |
| DistributorID |
Set default value = ""(Blank) Otherwise set DistributorID |
Object |
None. |
| FirmwareID |
Set default value = "0" Otherwise set FirmwareID |
Object |
None. |
| Password |
Set default value = ""(Blank) Otherwise set Password |
Object |
None. |
| Status |
Status is required. Set DeviceStatus from GetAllMasterValues Method |
Object |
None. |
Request Formats
application/json, text/json
{
"ID": {},
"ProductID": {},
"SerialNo": {},
"IMEI": {},
"DevUI": {},
"ICCID": {},
"IMSI": {},
"DistributorID": {},
"FirmwareID": {},
"Password": {},
"Status": {},
"CreatedBy": {},
"CreatedDateTime": {},
"CreatedIp": {},
"ModifiedBy": {},
"ModifiedDateTime": {},
"ModifiedIp": {}
}
application/xml, text/xml
<DevicesObject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/StrategicAlliance"> <CreatedBy /> <CreatedDateTime /> <CreatedIp /> <DevUI /> <DistributorID /> <FirmwareID /> <ICCID /> <ID /> <IMEI /> <IMSI /> <ModifiedBy /> <ModifiedDateTime /> <ModifiedIp /> <Password /> <ProductID /> <SerialNo /> <Status /> </DevicesObject>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample not available.