4 Device Actions

Add Device (Generic Device)

Method

POST

API

https://iotdev.dialog.lk/axt-iot-mbil-instance0001001/apkios/axtitomblebckendde/iotadmindev/device

Headers

IotMife-AccessToken : Generated At the step 4.2/4.3
X-Key               : Generated At the step 4.4
Accept              : application/json
Content-Type        : application/json

Body

Note : please change only the highlighted areas

{
    "brand":"Dialog",
    "type":"Generic_Device",
    "device_parent_id":"0",
    "user_id":"10",
    "name":"my generic device",
    "version":"v1"
}

Response

{
    "code": 200,
    "desc": "Device Successfully Added.",
    "device_id": "xyz"
}

Update a device

Method

PUT

API

https://iotdev.dialog.lk/axt-iot-mbil-instance0001001/apkios/axtitomblebckenddev/
iotadmindev/device/1276

Body

{
    "name":"abc",
    "featured":"N"
}

Response

{
    "code": 200,
    "desc": "Device Successfully Updated."
}

Delete a Device

Method

DELETE

API

https://iotdev.dialog.lk/axt-iot-mbil-instance0001001/apkios/axtitomblebckenddev/iotadmindev/device/1276>

Headers

IotMife-AccessToken : Generated At the step 4.2/4.3
X-Key               : Generated At the step 4.4
Accept              : application/json
Content-Type        : application/json

Response

{
    "code": 200,
    "desc": "Device Successfully Deleted."
}

Get device by ID

Method

DELETE

API

https://iotdev.dialog.lk/axt-iot-mbil-instance0001001/apkios/axtitomblebckenddev/iotadmindev/device?device_id=yyy

Headers

IotMife-AccessToken : Generated At the step 4.2/4.3
X-Key               : Generated At the step 4.4
Accept              : application/json
Content-Type        : application/json

Response

{
    "id": "1276",
    "deviceDefinitionId": ynt,
    "brand": "Dialog",
    "type": "GENERIC_DEVICE",
    "version": "v1",
    "device_category": "BOTH",
    "user_id": "yyy",
    "device_parent_id": "0",
    "mac_address": "87766565",
    "name": "new generic",
    "location": "",
    "location_id": "0",
    "additionalParams": {
        "macAddress": ""
    },

    "current_status": null,
    "featured": "N",
    "nonDeletable": false,
    "macAvailable": false
}
Last updated on 9th Mar 2018