Fetch Device(s)
This section of the Device API explains how to retrieve one or more devices.
Get Device
GET devices/{device_id}
Request
$ curl http://api.enapter.com/v3/devices/devicea0-45f2-4e9e-a6f0-69a310ab110b
Expand response with communication and connectivity:
$ curl http://api.enapter.com/v3/devices/devicea0-45f2-4e9e-a6f0-69a310ab110b?expand=communication,connectivity
Query Parameters
expandarray of strings#Comma-separated list of additional device information to display. By default, no additional fields are included.
Supported values:
site— includes information about the site, to which the device is connected.manifest— includes device blueprint manifest.properties— includes the last received device properties.connectivity— includes current device connection status.communication— includes device communication info.
Response
Default response:
{
"device": {
"id": "devicea0-45f2-4e9e-a6f0-69a310ab110b",
"blueprint_id": "bluepri1-50n3-4t9d-e6v0-69i310cb110e",
"name": "Gas detector in living room",
"site_id": "sitebba0-79f2-4e9e-a6f0-69a310ab110b",
"updated_at": 1735689600,
"slug": "gas-detector-in-living-room",
"type": "LUA",
"authorized_role": "INSTALLER"
}
}
Expanded response:
{
"device": {
"id": "devicea0-45f2-4e9e-a6f0-69a310ab110b",
"blueprint_id": "bluepri1-50n3-4t9d-e6v0-69i310cb110e",
"name": "My Device",
"site_id": "sitebba0-79f2-4e9e-a6f0-69a310ab110b",
"updated_at": 1735689600,
"slug": "my-device",
"type": "LUA",
"authorized_role": "INSTALLER",
"communication": {
"type": "UCM_LUA",
"upstream_id": "ucmbbba0-79f2-4e9e-a6f0-69a310ab110b"
},
"connectivity": {"status": "ONLINE"}
}
}
deviceobject#Object containing device information.
device.idstring#Device ID.
device.blueprint_idstring#Blueprint ID.
device.site_idstring#Site ID.
device.namestring#Device name.
device.updated_atinteger#The timestamp of the most recent update of the device’s information.
device.authorized_rolestring#The user's authorized role for the device.
device.slugstring#
device.typestring#One of the following types:
STANDALONE– device that operates independently without needing to be connected to a Gateway or other Enapter hardware.GATEWAY– device that connects Enapter energy systems to the Enapter Cloud for data communication, remote monitoring and control.EMBEDDED_UCM– communication module, which embedded into Enapter devices UCM,HARDWARE_UCM– Enapter Universal Communication Module (UCM),VIRTUAL_UCM– Enapter virtual UCM,LINK_MASTER_UCM, – Enapter LINK master device,LINK_SLAVE_UCM– Enapter UCM, connected to Enapter LINK master device,LUA– a third-party device, which connected to Enapter UCM and controlled by a Lua script,NATIVE– Enapter device like Electrolyser or Dryer.
device.implemented_profilesarray of strings#A list of profiles implemented by the device. You can also find them in the device's manifest.
Expanded fields
device.propertiesobject#Device's properties.
device.communicationobject#Device's communication info.
UCM_LUAorUCM_EMBBEDEDOther communication types communication.upstream_idstring#- Device ID of upstream device.
communication.upstream_idstring#- Device ID of upstream device.
communication.typestring#- A type of communication to the Enapter EMS:
-MQTT_V1_PLAINTEXT– unencrypted MQTT connection,
-MQTT_V1_TLS– encrypted MQTT connection (MQTTS),
-MQTT_V1_LOCALHOST– connected to a local MQTT server,
-UCM_LUA– connected to Enapter UCM, hardware or virtual,
-UCM_EMBEDDED– via embedded UCM,
-LINK– via Enapter LINK.
communication.typestring#- A type of communication to the Enapter EMS:
-MQTT_V1_PLAINTEXT– unencrypted MQTT connection,
-MQTT_V1_TLS– encrypted MQTT connection (MQTTS),
-MQTT_V1_LOCALHOST– connected to a local MQTT server,
-UCM_LUA– connected to Enapter UCM, hardware or virtual,
-UCM_EMBEDDED– via embedded UCM,
-LINK– via Enapter LINK.
communication.hardware_idstring#- Device hardware ID.
communication.channel_idstring#- Device channel ID.
List Devices
GET devices
Get a list of devices.
Request
$ curl http://api.enapter.com/v3/devices
To enrich response with an additional information:
$ curl http://api.enapter.com/v3/devices?expand=communication,connectivity
Query Parameters
limitnumber#The maximum number of devices to return.
offsetnumber#The number of devices to skip. Devices are ordered by ID.
profiles.hasstring#Filter devices by profiles.
expandarray of strings#Comma-separated list of additional device information to display. By default, no additional fields are included.
Supported values:
site— includes information about the site, to which the device is connected.manifest— includes device blueprint manifest.properties— includes the last received device properties.connectivity— includes current device connection status.communication— includes device communication info.
Response
Default response:
{
"devices": [
{
"id": "ucmbbba0-79f2-4e9e-a6f0-69a310ab110b",
"blueprint_id": "bluepri0-79n2-4t9e-u6c0-69m310ab110b",
"name": "My UCM",
"site_id": "sitebba0-79f2-4e9e-a6f0-69a310ab110b",
"updated_at": 1735689600,
"slug": "my-ucm",
"type": "HARDWARE_UCM",
"authorized_role": "INSTALLER"
},
{
"id": "devicea0-45f2-4e9e-a6f0-69a310ab110b",
"blueprint_id": "bluepri1-50n3-4t9d-e6v0-69i310cb110e",
"name": "My Device",
"site_id": "sitebba0-79f2-4e9e-a6f0-69a310ab110b",
"updated_at": 1735689600,
"slug": "my-device",
"type": "LUA",
"authorized_role": "INSTALLER"
}
],
"total_count": 2
}
Expanded response:
{
"devices": [
{
"id": "ucmbbba0-79f2-4e9e-a6f0-69a310ab110b",
"blueprint_id": "bluepri0-79n2-4t9e-u6c0-69m310ab110b",
"name": "My UCM",
"site_id": "sitebba0-79f2-4e9e-a6f0-69a310ab110b",
"updated_at": 1735689600,
"slug": "my-ucm",
"type": "HARDWARE_UCM",
"authorized_role": "INSTALLER",
"communication": {
"type": "MQTT_V1_TLS",
"hardware_id": "C8795CBA5375484E829105E959663C8B",
"channel_id": "ucm"
},
"connectivity": {"status": "ONLINE"}
},
{
"id": "devicea0-45f2-4e9e-a6f0-69a310ab110b",
"blueprint_id": "bluepri1-50n3-4t9d-e6v0-69i310cb110e",
"name": "My Device",
"site_id": "sitebba0-79f2-4e9e-a6f0-69a310ab110b",
"updated_at": 1735689600,
"slug": "my-device",
"type": "LUA",
"authorized_role": "INSTALLER",
"communication": {
"type": "UCM_LUA",
"upstream_id": "ucmbbba0-79f2-4e9e-a6f0-69a310ab110b"
},
"connectivity": {"status": "ONLINE"}
}
],
"total_count": 2
}
devicesarray of objects#A list of
Deviceobjects.deviceobject#Object containing device information.
device.idstring#Device ID.
device.blueprint_idstring#Blueprint ID.
device.site_idstring#Site ID.
device.namestring#Device name.
device.updated_atinteger#The timestamp of the most recent update of the device’s information.
device.authorized_rolestring#The user's authorized role for the device.
device.slugstring#
device.typestring#One of the following types:
STANDALONE– device that operates independently without needing to be connected to a Gateway or other Enapter hardware.GATEWAY– device that connects Enapter energy systems to the Enapter Cloud for data communication, remote monitoring and control.EMBEDDED_UCM– communication module, which embedded into Enapter devices UCM,HARDWARE_UCM– Enapter Universal Communication Module (UCM),VIRTUAL_UCM– Enapter virtual UCM,LINK_MASTER_UCM, – Enapter LINK master device,LINK_SLAVE_UCM– Enapter UCM, connected to Enapter LINK master device,LUA– a third-party device, which connected to Enapter UCM and controlled by a Lua script,NATIVE– Enapter device like Electrolyser or Dryer.
device.implemented_profilesarray of strings#A list of profiles implemented by the device. You can also find them in the device's manifest.
Expanded fields
device.propertiesobject#Device's properties.
device.communicationobject#Device's communication info.
UCM_LUAorUCM_EMBBEDEDOther communication types communication.upstream_idstring#- Device ID of upstream device.
communication.upstream_idstring#- Device ID of upstream device.
communication.typestring#- A type of communication to the Enapter EMS:
-MQTT_V1_PLAINTEXT– unencrypted MQTT connection,
-MQTT_V1_TLS– encrypted MQTT connection (MQTTS),
-MQTT_V1_LOCALHOST– connected to a local MQTT server,
-UCM_LUA– connected to Enapter UCM, hardware or virtual,
-UCM_EMBEDDED– via embedded UCM,
-LINK– via Enapter LINK.
communication.typestring#- A type of communication to the Enapter EMS:
-MQTT_V1_PLAINTEXT– unencrypted MQTT connection,
-MQTT_V1_TLS– encrypted MQTT connection (MQTTS),
-MQTT_V1_LOCALHOST– connected to a local MQTT server,
-UCM_LUA– connected to Enapter UCM, hardware or virtual,
-UCM_EMBEDDED– via embedded UCM,
-LINK– via Enapter LINK.
communication.hardware_idstring#- Device hardware ID.
communication.channel_idstring#- Device channel ID.
total_countinteger#The total number of user's devices.