Device Location - Get Device with Location
Getting the device with location data
Gethttps://api.iotstadium.com/ext/devices?include_location_response=1
Parameter
Field | Type | Description |
---|---|---|
include_location_response | Text |
To get the location detail for each device |
{
"key": "include_location_response",
"value": "1"
}
{
"message": "success",
"code": 200,
"data": {
"devices": [
{
"id": 590,
"device_name": "addd device from insomnia",
"created_at": "2024-05-30 03:20:40",
"device_type": {
"id": 320,
"device_type_name": "Dragino LHT52",
"is_predefined": 0,
"is_image_model_type": 0
},
"last_seen": null,
"location_id": null,
"device_network_id": 2,
"device_connectivity_type_id": 1,
"device_type_id": 320,
"is_collection": 0,
"access_type": null,
"location_custom_field": [],
"location": null,
"device_connectivity_type": {
"id": 1,
"name": "MQTT"
},
"device_network": {
"id": 2,
"name": "Helium"
}
},
{
"id": 589,
"device_name": "testing mqtt again",
"created_at": "2024-05-30 03:20:10",
"device_type": {
"id": 320,
"device_type_name": "Dragino LHT52",
"is_predefined": 0,
"is_image_model_type": 0
},
"last_seen": null,
"location_id": null,
"device_network_id": 2,
"device_connectivity_type_id": 1,
"device_type_id": 320,
"is_collection": 0,
"access_type": null,
"location_custom_field": [],
"location": null,
"device_connectivity_type": {
"id": 1,
"name": "MQTT"
},
"device_network": {
"id": 2,
"name": "Helium"
}
},
{
"id": 548,
"device_name": "sai-test-mqtt",
"created_at": "2024-03-13 05:13:09",
"device_type": null,
"last_seen": "2024-05-24 05:14:14",
"location_id": null,
"device_network_id": 2,
"device_connectivity_type_id": 1,
"device_type_id": 0,
"is_collection": 0,
"access_type": null,
"location_custom_field": [],
"location": null,
"device_connectivity_type": {
"id": 1,
"name": "MQTT"
},
"device_network": {
"id": 2,
"name": "Helium"
}
},
{
"device_id": 527,
"id": 527,
"device_name": "lora-1",
"device_type": "",
"device_is_public": 0,
"device_is_gateway": 0,
"tenant_id": 37,
"label": null,
"description": null,
"created_at": "2024-01-23 03:54:27",
"last_seen": "2024-02-13 06:25:53",
"location_id": null,
"device_connectivity_type_id": 4,
"device_network_id": 2,
"deveui": "",
"access_type": null,
"pivot": {
"device_collection_id": 29,
"device_id": 527
},
"device_connectivity_type": {
"id": 4,
"name": "LoRa"
},
"device_network": {
"id": 2,
"name": "Helium"
},
"location_custom_field": [],
"location": null,
"group_device": []
},
{
"id": 143,
"device_name": "[archived] living room sensors",
"created_at": "2021-03-29 03:32:26",
"device_type": null,
"last_seen": "2021-12-14 06:26:50",
"location_id": 8,
"device_network_id": 0,
"device_connectivity_type_id": 1,
"device_type_id": 0,
"is_collection": 0,
"access_type": null,
"location_custom_field": [
{
"val": "A",
"key_field": "Floor",
"option_value": "[\"A\",\"B\",\"C\",\"D\",\"E\",null]",
"pivot": {
"device_id": 143,
"location_custom_field_id": 29
}
},
{
"val": "2",
"key_field": "Room",
"option_value": "[\"1\",\"2\",\"3\",\"4\",\"5\",\"123\",null]",
"pivot": {
"device_id": 143,
"location_custom_field_id": 32
}
},
{
"val": "YX",
"key_field": "Block",
"option_value": "[\"XY\",\"YX\",null,\"aa\"]",
"pivot": {
"device_id": 143,
"location_custom_field_id": 35
}
},
{
"val": "A1",
"key_field": "Place",
"option_value": "[\"A1\",null]",
"pivot": {
"device_id": 143,
"location_custom_field_id": 36
}
},
{
"val": "test",
"key_field": "Door",
"option_value": "[\"test\",null]",
"pivot": {
"device_id": 143,
"location_custom_field_id": 37
}
}
],
"location": {
"location_name": "[Hazna] Jakarta",
"description": null,
"id": 8
},
"device_connectivity_type": {
"id": 1,
"name": "MQTT"
},
"device_network": null
}
]
}
}