Automation - GET Device Include Location Response
Get
{{url_iot_backend}}/ext/devices?include_location_response=1
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
},
Parameter
Field | Type | Description |
---|---|---|
include_location_response | Integer |
If set to 1, the response will include location-related data 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": 588,
"device_name": "testing mqtt",
"created_at": "2024-05-30 01:18:20",
"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"
}
},
]
}
}
{
"success": false,
"error": {
"code": 401,
"message": "Unauthorized: Invalid token"
}
}