Download OpenAPI specification:Download
This is a guide for getting started with the Smart Breaker API (formerly known as the Energy Management API, or EM API). Details about all API endpoints can be found in the operations documentation below, or by navigating with the left sidebar.
IMPORTANT: The operations in this document with the Preview Only tag are ONLY available in the Preview API. These operations are subject to undergo breaking changes prior to a full production release and may never be supported in the production Smart Breaker API at all. Using any Preview Only operation in a production application is discouraged.
NOTE: Access to the Preview API requires a Preview API Key. A Preview API key can be generated on the Application page in the Smart Breaker Developer Portal. Refer to the Prerequisites section for more information.
An Application is the top-level hierarchical node of the Smart Breaker API (see System Hierarchy for more details), and is represented by a set of Application Credentials. Application Credentials consist of a Client ID and two Secrets.
Additionally, all requests in the Smart Breaker API require an API Key to be
provided in the request headers (in the em-api-subscription-key
header,
specifically).
NOTE: Application Secrets have a one-year lifetime and must be rotated, and each Secret must be rotated independently. Application Secret rotation is accomplished via the Smart Breaker Developer Portal.
NOTE: Eaton does not store Application Secrets, so these will have to be securely stored by the Developer. However, Eaton stores Application Client IDs and API Keys, and those can be revisited in the Smart Breaker Developer Portal at any time after Application creation.
Obtain a set of Application Credentials and an API Key by creating an Application via the Smart Breaker Developer Portal.
Eaton does not offer end-user management for integrations, with the exception of user account management for Installers and Application Developers. Installers are mentioned in this guide as they are managed programmatically via the APIs (see the Manage Installers section for more information), while Application Developers are managed solely through the Smart Breaker Developer Portal.
It is the Application Developer's responsibility to store and manage users of their system. The intention is that the Application should be responsible for creating middleware functionality that handles users' requests and authorization based on the organization they belong to.
Eaton manages Installer users and the Device Commissioning experience in order to capture information which is necessary for enabling Smart Breaker Applications.
It is safe for a Application Developers to expose the following to its application's end-users:
Information about the Application, its Organizations, and their respective Service Accounts should not be exposed to the Application's end-users.
The Smart Breaker Developer Portal is available for Developers to use. The Developer Portal is used to create your Developer Account, create and manage Teams of Developers, and create and manage Applications. Once you've created your necessary account, team(s), and application(s), you'll have everything you need to make use of the endpoints documented herein.
It is highly recommended that all developers use the interactive tutorial to understand how to best utilize the Smart Breaker API, so go check it out and come back here to dive in!
For any support needs, please contact our support email address: Smart Breaker API Support.
An Eaton engineer will promptly review your request and reply via email.
Throughout the operation documentation below, you may encounter a tag specifying that the operation is SB Only or EV Only. This API supports interaction with more than one physical device type - specifically, it supports Eaton Smart Breakers and Eaton EV Smart Breaker Chargers.
Most of the Device Command and other device-related operations are supported by both device types, but there are a subset of operations that are only supported by one or the other.
Operations with the tag SB Only are only supported by Eaton Smart
Breakers. These devices have a corresponding hardwareType
of emcb
(i.e.
from the Get Device operation).
Operations with the tag EV Only are only supported by Eaton EV Smart
Breaker Chargers. These devices have a corresponding hardwareType
of
ev-emcb
(i.e. from the Get Device operation).
Version | Release Date | Summary |
---|---|---|
v1.20.0 | 2025-01-06 | No Changes. |
v1.19.0 | 2023-11-29 | No Changes. |
v1.18.0 | 2023-10-16 | No Changes. |
v1.17.0 | 2023-08-02 | No Changes. |
v1.16.0 | 2023-06-21 | No Changes. |
v1.15.0 | 2023-03-30 | No Changes. |
v1.14.0 | 2023-03-06 | No Changes. |
v1.13.0 | 2022-12-14 | No changes. |
v1.12.0 | 2022-12-05 | Contains additions, changes, bugfixes, and improvements. |
v1.11.0 | 2022-09-28 | Contains additions, changes, and improvements. |
v1.10.3 | 2022-08-16 | Contains bugfixes and improvements. |
v1.10.2 | 2022-06-24 | Contains changes and improvements. |
v1.10.1 | 2022-05-25 | Contains bugfixes. |
v1.10.0 | 2022-04-22 | Contains additions, changes, improvements, and documentation updates. |
v1.9.1 | 2022-02-24 | Contains additions and improvements. |
v1.9.0 | 2022-02-11 | Contains additions, changes, and documentation updates. |
v1.8.0 | 2022-01-18 | Contains additions, improvements, bugfixes, documentation updates, and deprecations. |
v1.7.0 | 2021-11-22 | Contains additions. |
v1.6.1 | 2021-11-16 | Contains improvements and bugfixes. |
v1.6.0 | 2021-10-19 | Contains additions, improvements, bugfixes, and documentation updates. |
v1.5.0 | 2021-08-27 | Contains additions, improvements, and documentation updates. |
v1.4.1 | 2021-07-23 | Contains bugfixes. |
v1.4.0 | 2021-07-13 | Contains additions, documentation updates, and internal improvements. |
v1.3.1 | 2021-04-22 | Contains bugfixes. |
v1.3.0 | 2021-04-08 | Contains updates and additions, including support for Local Communications. |
v1.2.0 | 2021-02-22 | Contains additions, updates, bugfixes and deprecations. |
v1.1.1 | 2021-01-06 | Contains bugfixes. |
v1.1.0 | 2020-12-14 | Contains additions, updates, and bugfixes. |
v1.0.0 | 2020-09-29 | Initial Production Release. |
locationId
, organizationId
, type
, deviceIds
, clockSchedule
, createdAt
, path
and body
scope
, locationId
, or isActive
status.inviteType
field that describes how the user role was assigned.endTime
as an optional input parameter for cron schedules.endTime
for cron schedules.serialNumber
is now included in the payload for the device onboarding
webhook data.0
for the value of the timer if no timer is active.configuration.apiConfiguration.enabled
to be set to false
if not provided
in the request for the Update EVSE Configuration Settings and
Mode endpoint.configuration.apiConfiguration.restrictions.maxEnergy
restriction for the
Update EVSE Configuration Settings and
Mode endpoint.webhook
to 3 for a device.address
and equipment
locations in one call.meter.settings.loadPresentThreshold
, telemetry
, and bargraph
data.startTime
, scheduleType
, and cronSchedule
.numSamples
to hwSamples
for telemetry data to match implementation)axios
instead of $.ajax
breaker.metadata.mainHandlePositon
to Stream Publish
PayloadThis release contains bugfixes.
This release contains additions, documentation updates, and internal improvements.
The following operations have been added to the /streams resource.
The following operations have been added to the /devices resource.
This release contains bugfixes.
This release contains updates and additions, including support for Local Communications.
This release contains additions, updates, bugfixes and deprecations.
mainHandlePosition
has been added to the breaker metadata
section of the stream payload (breaker.metadata.mainHandlePosition
)loadState
has been added to the meter metadata section of the
stream payload (meter.metadata.loadState
)track-meter-data
mode.schemaVersion
has been updated to 4.2.0.beta
(to
reflect the inclusion of mainHandlePosition
and loadState
).This release contains bugfixes.
This release contains additions, updates, and bugfixes.
secondsUntilReset
was added as an optional parameter to re-close the
breaker (after an open operation) after secondsUntilReset
seconds/bargraph/settings/mode
/bargraph/settings/colors
/meter/settings/loadPresentThreshold
serialNumber
has been added to the root of all device stream payloads and
maps to the Legacy Smart Breaker Platform idDevice keyschemaVersion
in device stream payloads has been updated to
v4.1.0.beta (reflecting the update to include serialNumber in the payload)Initial Production Release.
idAgent
updated to deviceId
idTransaction
updated to transactionId
ts
is added for all stream push payloadsApp Store is a registered trademark of Apple Inc.
Google Play and the Google Play logo are trademarks of Google LLC
Registers a device onboarding webhook. This webhook is called every time a device is successfully commissioned within an Application hierarchy.
Uniqueness of the webhook is based off of the provided uri
.
The additionalHeaders
that are provided during registration will be provided as a part
of the headers in the webhook call. These headers can be used as an authentication
mechanism so the EM system can be authenticated when calling the webhook. A shared secret
is recommended.
Refer to the Device Onboarding Webhook webhook request for details on how that request is structured.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
uri required | string <= 256 characters The webhook URI. |
additionalHttpHeaders | object Generic object containing any webhook headers. |
{- "uri": "string",
- "additionalHttpHeaders": { }
}
{- "data": {
- "id": "string",
- "uri": "string",
- "additionalHttpHeaders": { }
}
}
Retrieves the full list of device onboarding webhooks available (via read permissions) to the account associated with the provided Authorization token.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/deviceWebhooks`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "b63aa516-6a6f-4371-a29f-0a90f163f9d5", // "uri": "www.partner-application.com/device-webhook", // "additionalHttpHeaders": { // "Authorization": "Bearer 1234567890", // "AnotherHeader": "AnotherValue" // } // }, // { // "id": "c27398a4-3597-41eb-b196-99b480b5723a", // "uri": "www.partner-application.com/other-device-webhook", // "additionalHttpHeaders": { // "Authorization": "Bearer 1234567890" // } // } // ] // } })
{- "data": [
- {
- "id": "string",
- "uri": "string",
- "additionalHttpHeaders": { }
}
]
}
Gets a device onboarding webhook.
webhookId required | string Unique ID of the device webhook. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
{- "data": {
- "id": "string",
- "uri": "string",
- "additionalHttpHeaders": { }
}
}
webhookId required | string Unique ID of the device webhook. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Retrieves the full list of devices available (via read permissions) to the account associated with the provided Authorization token. The results can be limited by specifying filter criteria (only one filter criteria can be supported at a time).
Filtering on 'locationId' (of type equipment) returns a list of devices directly installed at the provided locationId.
Filtering on 'ancestorLocationId' returns a list of devices installed at the provided ancestorLocationId, or at any of its child locations.
Filtering on 'serialNumber' returns a list with only one device that has the provided serialNumber.
$filter | string Enum: "locationId eq '{locationId}'" "ancestorLocationId eq '{ancestorLocationId}'" "serialNumber eq '{serialNumber}'" Filter based on locationId or ancestorLocationId or serialNumber |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application or Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an appropriate auth token. var locationId = "a5db611d-d845-4a0a-9580-72444593fdd2"; var filter = `locationId eq '${locationId}'`; var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices?$filter=${filter}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "f4628c73-0c62-491a-9454-a4f1b08e98ef", // "locationId": "a5db611d-d845-4a0a-9580-72444593fdd2", // "hardwareType": "emcb", // "sku": "SUHJ8301", // "serialNumber": "30000e1c248a3f18" // }, // { // "id": "2f088162-5b66-4bee-ad60-fd47b0c3017b", // "locationId": "a5db611d-d845-4a0a-9580-72444593fdd2", // "hardwareType": "ev-emcb", // "sku": "KSCV1289", // "serialNumber": "30000d3a152e2a80", // "chargerStationId": "etn-8675" // }, // { // "id": "c27398a4-3597-41eb-b196-99b480b5723a", // "locationId": "a5db611d-d845-4a0a-9580-72444593fdd2", // "hardwareType": "emcb", // "sku": "BREM1015", // "serialNumber": "30000d8a102e8a60", // "loadDetails": { // "type": "air-conditioner", // "manufacturerName": "Eaton", // "modelName": "Air 50" // } // } // ] // } })
{- "data": [
- {
- "id": "string",
- "locationId": "string",
- "hardwareType": "string",
- "sku": "string",
- "serialNumber": "string",
- "chargerStationId": "string",
- "loadDetails": {
- "type": "air-conditioner",
- "manufacturerName": "string",
- "modelName": "string"
}
}
]
}
Retrieves the device information.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an appropriate auth token. var deviceId = "f4628c73-0c62-491a-9454-a4f1b08e98ef"; var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/{deviceId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "id": "f4628c73-0c62-491a-9454-a4f1b08e98ef", // "locationId": "90965b9a-7dba-455a-a280-30d8a86d9b5e", // "hardwareType": "emcb", // "sku": "SUHJ8301", // "serialNumber": "30000e1c248a3f18" // } // } })
{- "data": {
- "id": "string",
- "locationId": "string",
- "hardwareType": "string",
- "sku": "string",
- "serialNumber": "string",
- "chargerStationId": "string",
- "loadDetails": {
- "type": "air-conditioner",
- "manufacturerName": "string",
- "modelName": "string"
}
}
}
Decommission a device. The endpoint fully decommissions a device; all active streams will be removed, and the device will undergo a factory reset.
NOTE: If the device is offline, this request will fail and the device will not be decommissioned.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
This endpoint can be used to update a variety of details about the device, including its parent location and connected load information.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
locationId | string The ID of the new parent location. Must be within the same organization as the current parent location. |
object Details including type, model and manufacturer's name. |
{- "locationId": "string",
- "loadDetails": {
- "type": "air-conditioner",
- "manufacturerName": "string",
- "modelName": "string"
}
}
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Performs a soft reboot of the device. This allows pending firmware updates to be applied.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an Organization auth token. var deviceId = "b74b6589-909e-463d-9435-ca3e216bbb93"; var request = { "method": "POST", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/restart`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); //No Content })
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Get the device's remote handle position
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "f4628c73-0c62-491a-9454-a4f1b08e98ef" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/breaker/remoteHandle/position`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "position": "open" // } // } })
{- "data": {
- "position": "open"
}
}
Set the Remote Handle Position.
NOTE: if the device is actively participating in an Override Event then the changes will NOT be applied immediately but instead they will be stored and applied once the override event ends.
NOTE: if the device is actively participating in an Override Event then secondsUntilReset
will NOT be accepted.
NOTE: setting an Override Event will cancel any existing 'secondsUntilReset'.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
command required | string Enum: "open" "close" The desired handle position |
reason required | string The rationale for changing handle position |
secondsUntilReset | integer [ 0 .. 3600 ] The duration, in seconds, when the breaker position will reset after the command initially operates. Optional, and will only work when 'command' is 'open', otherwise request will fail. Set to 0 to cancel the timer (if one already exists), otherwise the timer must be at least 10 seconds. |
{- "command": "open",
- "reason": "string",
- "secondsUntilReset": 3600
}
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Get seconds until remote handle resets. Value will be 0
if no timer is active.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "f4628c73-0c62-491a-9454-a4f1b08e98ef" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/breaker/remoteHandle/secondsUntilReset`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "secondsUntilReset": 16 // } // } })
{- "data": {
- "secondsUntilReset": 0
}
}
Get device connection state
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "f4628c73-0c62-491a-9454-a4f1b08e98ef" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/device/metadata/isConnected`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "isConnected": true, // "ts": 1607025957 // } // } })
{- "data": {
- "isConnected": true,
- "ts": 0
}
}
Configure meter waveform thresholds for a device.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
p0OvercurrentDuration | integer [ 50 .. 200 ] The number of samples (relative to the 4kHz front-end sampling rate) that the instantaneous current must be above the overcurrent level to cause a trigger. |
p0OvercurrentEnabled | boolean Whether or not Phase 0 Overcurrent trigger is enabled |
p0mAOvercurrent | integer [ 1 .. 100000 ] Phase 0 Overcurrent Level in milliAmps (instantaneous). |
p0SagDuration | integer [ 50 .. 200 ] The number of samples (relative to the 4kHz front-end sampling rate) that the instantaneous voltage must be below the voltage sag level to cause a trigger. |
p0SagEnabled | boolean Whether or not Phase 0 Voltage Sag trigger is enabled. |
p0mVSag | integer [ 0 .. 120000 ] Phase 0 Voltage Sag Level in milliVolts (instantaneous) |
p0SwellDuration | integer [ 50 .. 200 ] The number of samples (relative to the 4kHz front-end sampling rate) that the instantaneous voltage must be above the voltage swell level to cause a trigger. |
p0SwellEnabled | boolean Whether or not Phase 0 Voltage Swell trigger is enabled. |
p0mVSwell | integer [ 120000 .. 200000 ] Phase 0 Voltage Swell Level in milliVolts (instantaneous). |
p1OvercurrentDuration | integer [ 50 .. 200 ] The number of samples (relative to the 4kHz front-end sampling rate) that the instantaneous current must be above the overcurrent level to cause a trigger. |
p1OvercurrentEnabled | boolean Whether or not Phase 1 Overcurrent trigger is enabled. |
p1mAOvercurrent | integer [ 1 .. 100000 ] Phase 1 Overcurrent Level in milliAmps (instantaneous). |
p1SagDuration | integer [ 50 .. 200 ] The number of samples (relative to the 4kHz front-end sampling rate) that the instantaneous voltage must be below the voltage sag level to cause a trigger. |
p1SagEnabled | boolean Whether or not Phase 1 Voltage Sag trigger is enabled. |
p1mVSag | integer [ 0 .. 120000 ] Phase 1 Voltage Sag Level in milliVolts (instantaneous). |
p1SwellDuration | integer [ 50 .. 200 ] The number of samples (relative to the 4kHz front-end sampling rate) that the instantaneous voltage must be above the voltage swell level to cause a trigger. |
p1SwellEnabled | boolean Whether or not Phase 1 Voltage Swell trigger is enabled. |
p1mVSwell | integer [ 120000 .. 200000 ] Phase 1 Voltage Swell Level in milliVolts (instantaneous). |
samplesAfterTrigger | integer [ 1 .. 199 ] Number of samples after waveform trigger to be captured. |
samplesAfterTriggerFastRMS | integer [ 1 .. 254 ] Number of samples after fast RMS trigger to be captured. |
{- "p0OvercurrentDuration": 50,
- "p0OvercurrentEnabled": true,
- "p0mAOvercurrent": 1,
- "p0SagDuration": 50,
- "p0SagEnabled": true,
- "p0mVSag": 120000,
- "p0SwellDuration": 50,
- "p0SwellEnabled": true,
- "p0mVSwell": 120000,
- "p1OvercurrentDuration": 50,
- "p1OvercurrentEnabled": true,
- "p1mAOvercurrent": 1,
- "p1SagDuration": 50,
- "p1SagEnabled": true,
- "p1mVSag": 120000,
- "p1SwellDuration": 50,
- "p1SwellEnabled": true,
- "p1mVSwell": 120000,
- "samplesAfterTrigger": 1,
- "samplesAfterTriggerFastRMS": 1
}
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Get the current meter waveform thresholds configuration for a device.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "f4628c73-0c62-491a-9454-a4f1b08e98ef" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/meter/settings/waveformConfiguration`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "p0OvercurrentDuration": 50, // "p0OvercurrentEnabled": true, // "p0mAOvercurrent": 100000, // "p0SagDuration": 53, // "p0SagEnabled": false, // "p0mVSag": 119999, // "p0SwellDuration": 54, // "p0SwellEnabled": true, // "p0mVSwell": 199998, // "p1OvercurrentDuration": 55, // "p1OvercurrentEnabled": false, // "p1mAOvercurrent": 99997, // "p1SagDuration": 56, // "p1SagEnabled": true, // "p1mVSag": 119996, // "p1SwellDuration": 57, // "p1SwellEnabled": false, // "p1mVSwell": 199995, // "samplesAfterTrigger": 1, // "samplesAfterTriggerFastRMS": 254 // } // } })
{- "data": {
- "p0OvercurrentDuration": 50,
- "p0OvercurrentEnabled": true,
- "p0mAOvercurrent": 1,
- "p0SagDuration": 50,
- "p0SagEnabled": true,
- "p0mVSag": 120000,
- "p0SwellDuration": 50,
- "p0SwellEnabled": true,
- "p0mVSwell": 120000,
- "p1OvercurrentDuration": 50,
- "p1OvercurrentEnabled": true,
- "p1mAOvercurrent": 1,
- "p1SagDuration": 50,
- "p1SagEnabled": true,
- "p1mVSag": 120000,
- "p1SwellDuration": 50,
- "p1SwellEnabled": true,
- "p1mVSwell": 120000,
- "samplesAfterTrigger": 1,
- "samplesAfterTriggerFastRMS": 1
}
}
Configure the meter load present threshold for a device.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
loadPresentThreshold | integer >= 1 The load present threshold in milliAmps. |
{- "loadPresentThreshold": 1
}
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Gets the meter load present threshold for a device.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "f4628c73-0c62-491a-9454-a4f1b08e98ef" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/meter/settings/loadPresentThreshold`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "loadPresentThreshold": 20 // } // } })
{- "data": {
- "loadPresentThreshold": 1
}
}
Configure the telemetry alignment. The two available alignments are none and clock and are defined below.
none
: the device will report the telemetry as soon as it comes online in 5-minute intervals by default, or at the rate set in PUT /devices/{deviceId}/telemetry/settings/dataReportRate. This is the default alignment.
clock
: the device will report the telemetry on a clock aligned minute boundary based on the configured data report rate (1:00pm, 1:05pm, 1:10pm, etc.). When configured in clock-aligned mode the first capture/report after the alignment is changed will wait for the next data report rate minute boundary before capturing, re-calibrating after each capture.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
alignment required | string Enum: "none" "clock" The alignment setting of telemetry. |
{- "alignment": "none"
}
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Configure the bargraph mode. The two available modes are track-meter-data and user-defined and are defined below.
track-meter-data
: the bargraph will track the current reported by the meter and display the amount of current relative to the current-rating of the device, starting from illuminating 1 green LED to 5 red LEDs. If the current exceeds the current-rating of the device, then all 5 red LEDs will be blinking. This is the bargraph's default mode.
user-defined
: the bargraph will display the colors based on the colors setting. If the colors setting is not configured, the bargraph will simply remain off until colors is configured.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
mode required | string Enum: "track-meter-data" "user-defined" The bargraph mode of operation. |
{- "mode": "track-meter-data"
}
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Gets the configured bargraph mode. The two possible modes are track-meter-data and user-defined and are defined below.
track-meter-data
: the bargraph will track the current reported by the meter and display the amount of current relative to the current-rating of the device, starting from illuminating 1 green LED to 5 red LEDs. If the current exceeds the current-rating of the device, then all 5 red LEDs will be blinking. This is the bargraph's default mode.
user-defined
: the bargraph will display the colors based on the colors setting. If the colors setting is not configured, the bargraph will simply remain off until colors is configured.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "f4628c73-0c62-491a-9454-a4f1b08e98ef" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/bargraph/settings/mode`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "mode": "user-defined" // } // } })
{- "data": {
- "mode": "track-meter-data"
}
}
Configure the bargraph colors. NOTE: These colors will only take effect if the bargraph mode
is configured as user-defined
.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
required | object (ledColor) An object containing three items - red, green, and blue - whose values must range from 0-255, representing the RGB color value of the 1st LED. |
required | object (ledColor) An object containing three items - red, green, and blue - whose values must range from 0-255, representing the RGB color value of the 2nd LED. |
required | object (ledColor) An object containing three items - red, green, and blue - whose values must range from 0-255, representing the RGB color value of the 3rd LED. |
required | object (ledColor) An object containing three items - red, green, and blue - whose values must range from 0-255, representing the RGB color value of the 4th LED. |
required | object (ledColor) An object containing three items - red, green, and blue - whose values must range from 0-255, representing the RGB color value of the 5th LED. |
{- "led1": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led2": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led3": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led4": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led5": {
- "red": 255,
- "green": 255,
- "blue": 255
}
}
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Get the user-defined bargraph colors setting. NOTE: These colors will only take effect if the bargraph mode
is configured as user-defined
.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "f4628c73-0c62-491a-9454-a4f1b08e98ef" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/bargraph/settings/colors`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "led1": { // "red": 148, // "green": 187, // "blue": 199, // }, // "led2": { // "red": 216, // "green": 187, // "blue": 67, // }, // "led3": { // "red": 213, // "green": 100, // "blue": 144, // }, // "led4": { // "red": 80, // "green": 118, // "blue": 37 // }, // "led5": { // "red": 145, // "green": 162, // "blue": 197 // } // } // } })
{- "data": {
- "led1": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led2": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led3": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led4": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led5": {
- "red": 255,
- "green": 255,
- "blue": 255
}
}
}
Creates and records immediate a waveform from the device. If streams are configured, the waveform will be piped out to the configured streams.
deviceId required | string The device id. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 128 characters Shared Secret |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "d51f61c3-a4a6-43d2-b3f1-252c303b84b9" var request = { "method": "POST", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/waveforms`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "id": "d8778c58-5a90-487d-8583-6d568a8d2a2d", // "deviceId": "d51f61c3-a4a6-43d2-b3f1-252c303b84b9", // "numSamples": 10, // "triggers": [ // "Immediate" // ], // "shortestTrigger": "Immediate", // "capturedAt": "2021-04-23T13:20:37.443Z", // "captureWindowDuration": 1000, // "timeAfterTrigger": 100, // "sampleDelta": 100, // "data": { // "mVp0": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], // "mAp0": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], // "mVp1": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], // "mAp1": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ] // }, // "type": "waveform" // } })
{- "data": {
- "id": "string",
- "deviceId": "string",
- "numSamples": 0,
- "triggers": [
- "Immediate"
], - "shortestTrigger": "Immediate",
- "capturedAt": "2019-08-24T14:15:22Z",
- "captureWindowDuration": 0,
- "timeAfterTrigger": 0,
- "sampleDelta": 0,
- "data": {
- "mVp0": [
- 0
], - "mAp0": [
- 0
], - "mVp1": [
- 0
], - "mAp1": [
- 0
]
}, - "type": "waveform"
}
}
Gets the summaries of waveforms for a specific device. The results can be limited by specifying filter criteria using trigger type and/or capture time.
deviceId required | string The device id. |
$filter | string Filter based on trigger type and/or capture time. Supported filters are "trigger" and "capturedAt". The "trigger" filter supports the "eq" operator, like so: "trigger eq 'Immediate'". The filter value must be wrapped in single quotes. The "capturedAt" filter can use the "eq", "le" (less-than-or-equal), and "ge" (greater-than-or-equal) operators. The "le" and "ge" operators may be used together, but neither can be used in conjuction with the "eq" operator. The value of the filter must be in ISO 8601 format, e.g. 2020-10-08T14:30Z. This value should not be wrapped in quotes. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "d51f61c3-a4a6-43d2-b3f1-252c303b84b9" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/waveforms`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [ // { // "id": "d51f61c3-a4a6-43d2-b3f1-252c303b84b9", // "capturedAt": "2020-09-22T14:51:35+00:00", // "triggers": ["Immediate"], // "type": "waveform" // }, // { // "id": "2aec75cf-020e-4aa7-9368-74fdbc0223c5", // "capturedAt": "2020-10-08T14:30:30+00:00", // "triggers": ["Immediate", "Phase A Undervoltage"], // "type": "fastRMS" // } // ] // } })
{- "data": [
- {
- "id": "string",
- "capturedAt": "2019-08-24T14:15:22Z",
- "triggers": [
- "Immediate"
], - "type": "waveform"
}
]
}
Gets the full details of a waveform for a device.
deviceId required | string The device id. |
waveformId required | string The waveform id. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "d51f61c3-a4a6-43d2-b3f1-252c303b84b9" var waveformId = "d8778c58-5a90-487d-8583-6d568a8d2a2d" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/waveforms/${waveformId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "id": "d8778c58-5a90-487d-8583-6d568a8d2a2d", // "deviceId": "d51f61c3-a4a6-43d2-b3f1-252c303b84b9", // "numSamples": 10, // "triggers": [ // "Immediate", // "Phase 0 Overcurrent" // ], // "shortestTrigger": "Immediate", // "capturedAt": "2020-10-12T13:20:37.443Z", // "captureWindowDuration": 1000, // "timeAfterTrigger": 100, // "sampleDelta": 100, // "data": { // "mVp0": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], // "mAp0": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], // "mVp1": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], // "mAp1": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ] // }, // "type": "waveform" // } })
{- "data": {
- "id": "string",
- "deviceId": "string",
- "numSamples": 0,
- "triggers": [
- "Immediate"
], - "shortestTrigger": "Immediate",
- "capturedAt": "2019-08-24T14:15:22Z",
- "captureWindowDuration": 0,
- "timeAfterTrigger": 0,
- "sampleDelta": 0,
- "data": {
- "mVp0": [
- 0
], - "mAp0": [
- 0
], - "mVp1": [
- 0
], - "mAp1": [
- 0
]
}, - "type": "waveform"
}
}
Retrieves the latest Meter Telemetry data pushed from the device.
This endpoint supports offset pagination to support the volume of data that may be returned with this endpoint.
The time delta between entries in the response will be approximately 5 minutes, matching the rate at which telemetry data is collected from the device. Historical data will not be available for periods of time that the device is offline.
deviceId required | string The device id. |
startTime required | string <date-time> Represents the start UTC time in ISO 8601 format, e.g. 2020-07-01T14:30Z. Limits for the time range are enforced due to performance reasons, where the default maximum is 6 months. |
endTime | string <date-time> Represents the end UTC time in ISO 8601 format, e.g. 2020-07-01T14:30Z. |
offset required | integer [ 0 .. 2147483647 ] Offset for pagination of returned records. |
limit required | integer [ 0 .. 2147483647 ] number of records to be returned. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
{- "data": {
- "deviceId": "string",
- "results": [
- {
- "ts": 0,
- "currentA": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageAN": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "frequency": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "energy": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0
}, - "energyDelta": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0,
- "deltaTime": 0
}, - "currentB": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageBN": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageAB": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}
}
]
}, - "page": {
- "count": 0,
- "totalCount": 0,
- "offset": 0,
- "next": "string",
- "previous": "string"
}
}
Retrieves the latest Meter Telemetry data pushed from the device.
deviceId required | string The device id. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
{- "data": {
- "currentA": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageAN": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "frequency": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "energy": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0
}, - "energyDelta": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0,
- "deltaTime": 0
}, - "currentB": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageBN": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageAB": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "hwSamples": 0,
- "ts": 0
}
}
Retrieves the current meter telemetry reading from the device.
deviceId required | string The device id. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application or Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an appropriate auth token. var deviceId = "198256f7-8a97-413c-8258-0eb514efa40b"; var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/{deviceId}/data/telemetry/meter/reading`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "currentA": { // "val": 90 // }, // "voltageAN": { // "val": 120 // }, // "frequency": { // "val": 90 // }, // "sequence": 11, // "energy": { // "delivered": 21, // "generated": 31, // "deliveredWH": 41, // "generatedWH": 51 // }, // "currentB": { // "val": 95 // }, // "voltageBN": { // "val": 125 // }, // "voltageAB": { // "val": 110 // }, // "ts": 1 // } // } })
{- "data": {
- "currentA": {
- "val": 0
}, - "voltageAN": {
- "val": 0
}, - "frequency": {
- "val": 0
}, - "sequence": 0,
- "energy": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0
}, - "currentB": {
- "val": 0
}, - "voltageBN": {
- "val": 0
}, - "voltageAB": {
- "val": 0
}, - "ts": 0
}
}
Retrieves the latest data pushed from the device. The 'deviceId' filter criteria is required.
$filter required | string Value: "deviceId eq '{deviceId}'" Filters for getting latest device data |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an appropriate auth token. var deviceId = "f4628c73-0c62-491a-9454-a4f1b08e98ef"; var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/deviceData?$filter=deviceId eq '{deviceId}'`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "accelerometer": { // "telemetry": { // "x": { // "val": -0.98 // }, // "ts": 1645208404, // "y": { // "val": -0.016 // }, // "z": { // "val": 0.008 // } // } // }, // "breaker": { // "metadata": { // "ratedVoltage": { // "val": 240, // "ts": 946684812 // }, // "ratedCurrent": { // "val": 40, // "ts": 946684812 // }, // "numPoles": { // "val": 2, // "ts": 946684812 // }, // "mainHandlePosition": { // "val": true, // "ts": 1637101566 // } // }, // "settings": { // "remoteHandlePosition": { // "val": true, // "ts": 1643658336 // } // } // }, // "device": { // "telemetry": { // "lightLevel": { // "val": 7985 // }, // "ts": 1645208404, // "deviceFreeMemory": { // "val": 37204 // }, // "rssi": { // "val": -38 // } // }, // "metadata": { // "isConnected": { // "val": true, // "ts": 1645128921 // }, // "numBoots": { // "val": 5404, // "ts": 1645128933 // }, // "numWakeReasonException": { // "val": 1898, // "ts": 1643310267 // }, // "macAddress": { // "val": "0e1c248a3f18", // "ts": 1645128933 // }, // "ipAddress": { // "val": "192.168.0.1", // "ts": 1645128933 // }, // "bootROM": { // "val": "e87ddfb - release-38.17 - Thu Nov 15 09:49:52 2018 - eaton", // "ts": 1645128933 // }, // "osDevice": { // "val": "ba1d312 - release-42.6 - Wed Apr 28 09:07:31 2021 - eaton", // "ts": 1645128933 // }, // "osAgent": { // "val": "4b7c94b - v2.60.0 - Tue Apr 20 08:04:55 2021 - Electric Imp", // "ts": 1645128934 // }, // "idDeployment": { // "val": "c645f57d-8d90-af96-e8c0-f60fadc60088", // "ts": 1645128934 // } // } // }, // "meter": { // "telemetry": { // "currentA": { // "val": 5 // }, // "ts": 1645208404, // "currentB": { // "val": 497 // }, // "voltageAN": { // "val": 122009 // }, // "voltageBN": { // "val": 121962 // }, // "voltageAB": { // "val": 137 // }, // "frequency": { // "val": 60000 // }, // "rawEnergy": { // "q1mJpA": 4919666, // "q2mJpA": 192940, // "q3mJpA": 14255, // "q4mJpA": 474198, // "q1mJpB": 651120770, // "q2mJpB": 13105164, // "q3mJpB": 1278565, // "q4mJpB": 432344614759, // "q1mVARspA": 209191596, // "q2mVARspA": 197930526, // "q3mVARspA": 249032, // "q4mVARspA": 889136, // "q1mVARspB": 458173723, // "q2mVARspB": 246452862, // "q3mVARspB": 23213991, // "q4mVARspB": 170950693859 // }, // "rawEnergyDelta": { // "q1mJpA": 0, // "q2mJpA": 0, // "q3mJpA": 0, // "q4mJpA": 0, // "q1mJpB": 0, // "q2mJpB": 0, // "q3mJpB": 0, // "q4mJpB": 15778087, // "q1mVARspA": 0, // "q2mVARspA": 0, // "q3mVARspA": 0, // "q4mVARspA": 0, // "q1mVARspB": 0, // "q2mVARspB": 0, // "q3mVARspB": 0, // "q4mVARspB": 5600827, // "deltaTime": 298 // }, // "energy": { // "delivered": 433001129393, // "deliveredWH": 120278.09, // "generated": 14590924, // "generatedWH": 4.0530343 // }, // "energyDelta": { // "generated": 0, // "delivered": 15778087, // "deliveredWH": 4.382802, // "generatedWH": 0.0, // "deltaTime": 298 // } // }, // "metadata": { // "loadPresent": { // "val": true, // "ts": 1643658339 // }, // "loadState": { // "val": 1, // "ts": 1643658341 // } // }, // "settings": { // "loadPresentThreshold": { // "val": 40, // "ts": 1614019936 // } // } // }, // "thermometer": { // "telemetry": { // "temperature": { // "val": 80.7125 // }, // "ts": 1645208404 // } // }, // "telemetry": { // "settings": { // "alignment": { // "val": "clock", // "ts": 1643320250 // }, // "dataReportRate": { // "val": 300, // "ts": 1643320250 // } // } // }, // "bargraph": { // "settings": { // "mode": { // "val": "track-meter-data", // "ts": 1645129196 // }, // "colors": { // "val": { // "led1": { // "red": 43, // "green": 54, // "blue": 56 // }, // "led2": { // "red": 76, // "green": 23, // "blue": 64 // }, // "led3": { // "red": 23, // "green": 67, // "blue": 23 // }, // "led4": { // "red": 45, // "green": 76, // "blue": 22 // }, // "led5": { // "red": 22, // "green": 22, // "blue": 22 // } // }, // "ts": 1645129237 // } // } // }, // "deviceId": "f4628c73-0c62-491a-9454-a4f1b08e98ef", // "serialNumber": "30000e1c248a3f18" // } // } })
{- "data": {
- "deviceId": "string",
- "serialNumber": "string",
- "accelerometer": {
- "telemetry": {
- "x": {
- "val": 0
}, - "y": {
- "val": 0
}, - "z": {
- "val": 0
}, - "ts": 0
}
}, - "breaker": {
- "metadata": {
- "ratedVoltage": {
- "val": 120,
- "ts": 0
}, - "ratedCurrent": {
- "val": 15,
- "ts": 0
}, - "interruptingCurrent": {
- "val": 10000,
- "ts": 0
}, - "numPoles": {
- "val": 1,
- "ts": 0
}, - "totalPoles": {
- "val": 2,
- "ts": 0
}, - "lineTerminalStyle": {
- "val": "PLUG-ON",
- "ts": 0
}, - "mainHandlePosition": {
- "val": true,
- "ts": 0
}
}, - "settings": {
- "remoteHandlePosition": {
- "val": true,
- "ts": 0
}, - "underVoltageReleaseEnabled": {
- "val": true,
- "ts": 0
}
}
}, - "device": {
- "telemetry": {
- "lightLevel": {
- "val": 65336
}, - "deviceFreeMemory": {
- "val": 0
}, - "agentFreeMemory": {
- "val": 0
}, - "rssi": {
- "val": 0
}, - "ts": 0
}, - "metadata": {
- "isConnected": {
- "val": true,
- "ts": 0
}, - "numBoots": {
- "val": 0,
- "ts": 0
}, - "numWakeReasonException": {
- "val": 0,
- "ts": 0
}, - "macAddress": {
- "val": "string",
- "ts": 0
}, - "ipAddress": {
- "val": "string",
- "ts": 0
}, - "bootROM": {
- "val": "string",
- "ts": 0
}, - "osDevice": {
- "val": "string",
- "ts": 0
}, - "osAgent": {
- "val": "string",
- "ts": 0
}, - "idDeployment": {
- "val": "string",
- "ts": 0
}
}
}, - "meter": {
- "telemetry": {
- "currentA": {
- "val": 0
}, - "currentB": {
- "val": 0
}, - "voltageAN": {
- "val": 0
}, - "voltageBN": {
- "val": 0
}, - "voltageAB": {
- "val": 0
}, - "frequency": {
- "val": 0
}, - "rawEnergy": {
- "q1mJpA": 0,
- "q2mJpA": 0,
- "q3mJpA": 0,
- "q4mJpA": 0,
- "q1mJpB": 0,
- "q2mJpB": 0,
- "q3mJpB": 0,
- "q4mJpB": 0,
- "q1mVARspA": 0,
- "q2mVARspA": 0,
- "q3mVARspA": 0,
- "q4mVARspA": 0,
- "q1mVARspB": 0,
- "q2mVARspB": 0,
- "q3mVARspB": 0,
- "q4mVARspB": 0
}, - "rawEnergyDelta": {
- "q1mJpA": 0,
- "q2mJpA": 0,
- "q3mJpA": 0,
- "q4mJpA": 0,
- "q1mJpB": 0,
- "q2mJpB": 0,
- "q3mJpB": 0,
- "q4mJpB": 0,
- "q1mVARspA": 0,
- "q2mVARspA": 0,
- "q3mVARspA": 0,
- "q4mVARspA": 0,
- "q1mVARspB": 0,
- "q2mVARspB": 0,
- "q3mVARspB": 0,
- "q4mVARspB": 0,
- "deltaTime": 0
}, - "energy": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0
}, - "energyDelta": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0,
- "deltaTime": 0
}, - "ts": 0,
- "hwSamples": 0
}, - "events": {
- "waveformCaptured": { },
- "fastRMSCaptured": { }
}, - "metadata": {
- "loadPresent": {
- "val": true,
- "ts": 0
}, - "loadState": {
- "val": 0,
- "ts": 0
}
}, - "settings": {
- "loadPresentThreshold": {
- "val": 0,
- "ts": 0
}, - "waveformConfiguration": {
- "val": {
- "pAOvercurrentDuration": 0,
- "pAOvercurrentEnabled": true,
- "pASagDuration": 0,
- "pASagEnabled": true,
- "pASwellDuration": 0,
- "pASwellEnabled": true,
- "pAmAOvercurrent": 0,
- "pAmVSag": 0,
- "pAmVSwell": 0,
- "pBOvercurrentDuration": 0,
- "pBOvercurrentEnabled": true,
- "pBSagDuration": 0,
- "pBSagEnabled": true,
- "pBSwellDuration": 0,
- "pBSwellEnabled": true,
- "pBmAOvercurrent": 0,
- "pBmVSag": 0,
- "pBmVSwell": 0,
- "samplesAfterTrigger": 0,
- "samplesAfterTriggerFastRMS": 0
}, - "ts": 0
}
}
}, - "thermometer": {
- "telemetry": {
- "temperature": {
- "val": 0
}, - "ts": 0,
- "hwSamples": 0
}
}, - "telemetry": {
- "settings": {
- "alignment": {
- "val": "none",
- "ts": 0
}, - "dataReportRate": {
- "val": 60,
- "ts": 0
}
}
}, - "bargraph": {
- "settings": {
- "mode": {
- "val": "track-meter-data",
- "ts": 0
}, - "colors": {
- "val": {
- "led1": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led2": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led3": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led4": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led5": {
- "red": 255,
- "green": 255,
- "blue": 255
}
}, - "ts": 0
}
}
}
}
}
Sends a batch command to all devices within the provided location or to a specific set of devices anywhere in the hierarchy.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
locationId | string The Id of the Location where the devices to command are located (not required when deviceIds is used). |
deviceIds | Array of strings non-empty The Ids of the specified devices to command (not required when locationId is used). |
startTime | string Start time of a batch command scheduled for future execution, in ISO 8601 date time string format. When not included, the batch command will be triggered immediately. |
endTime | string End time of a batch command is the time after which the schedule will not get executed, in ISO 8601 date time string format.Can only be included when cron schedule is used. Default value 100 years from now. |
cronSchedule | string Schedule using Unix cron syntax. |
timeZone | string Represents time zone at which batch command is scheduled. If time zone is provided, a batch command is scheduled by interpreting the cron expression in that time zone. Else, batch command is scheduled by interpreting the cron expression in UTC time. Can only be included when cron schedule is used. |
path required | string Value: "/meter/settings/waveformConfiguration" |
required | object (meterWaveformThresholdsConfiguration) |
{- "locationId": "string",
- "deviceIds": [
- "string"
], - "startTime": "string",
- "endTime": "string",
- "cronSchedule": "string",
- "timeZone": "America/New_York",
- "path": "/meter/settings/waveformConfiguration",
- "body": {
- "p0OvercurrentDuration": 50,
- "p0OvercurrentEnabled": true,
- "p0mAOvercurrent": 1,
- "p0SagDuration": 50,
- "p0SagEnabled": true,
- "p0mVSag": 120000,
- "p0SwellDuration": 50,
- "p0SwellEnabled": true,
- "p0mVSwell": 120000,
- "p1OvercurrentDuration": 50,
- "p1OvercurrentEnabled": true,
- "p1mAOvercurrent": 1,
- "p1SagDuration": 50,
- "p1SagEnabled": true,
- "p1mVSag": 120000,
- "p1SwellDuration": 50,
- "p1SwellEnabled": true,
- "p1mVSwell": 120000,
- "samplesAfterTrigger": 1,
- "samplesAfterTriggerFastRMS": 1
}
}
{- "data": {
- "id": "string",
- "locationId": "string",
- "organizationId": "string",
- "type": "deviceBatchCommand",
- "deviceIds": [
- "string"
], - "clockSchedule": {
- "startTime": "string",
- "endTime": "string",
- "cronSchedule": "string",
- "timeZone": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "path": "/meter/settings/waveformConfiguration",
- "body": {
- "p0OvercurrentDuration": 50,
- "p0OvercurrentEnabled": true,
- "p0mAOvercurrent": 1,
- "p0SagDuration": 50,
- "p0SagEnabled": true,
- "p0mVSag": 120000,
- "p0SwellDuration": 50,
- "p0SwellEnabled": true,
- "p0mVSwell": 120000,
- "p1OvercurrentDuration": 50,
- "p1OvercurrentEnabled": true,
- "p1mAOvercurrent": 1,
- "p1SagDuration": 50,
- "p1SagEnabled": true,
- "p1mVSag": 120000,
- "p1SwellDuration": 50,
- "p1SwellEnabled": true,
- "p1mVSwell": 120000,
- "samplesAfterTrigger": 1,
- "samplesAfterTriggerFastRMS": 1
}
}
}
Retrieves the full list of batch command details available (via read permissions) to the account associated with the provided Authorization token. The results can be limited by specifying filter criteria.
Filtering on 'locationId' returns a list of batch command details that were created with the provided 'locationId'.
Filtering on 'type' returns a list of batch command details for a particular batch command 'type'. The 'type' value can be either deviceSunBatchCommand or deviceBatchCommand
$filter | string Enum: "locationId eq '{locationId}'" "type eq '{type}'" Filter based on locationId or type |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an appropriate auth token. var locationId = "a5db611d-d845-4a0a-9580-72444593fdd2"; var filter = `locationId eq '${locationId}'`; var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/deviceBatchCommands?$filter=${filter}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "f4628c73-0c62-491a-9454-a4f1b08e98ef", // "organizationId": "a0437cbf-c158-4543-b5c1-0ec9aab1bf6b", // "locationId": "a5db611d-d845-4a0a-9580-72444593fdd2", // "deviceIds": ["f4628c73-0c62-491a-9454-a4f1b08e98ef"], // "type": "deviceBatchCommand", // "clockSchedule": { // "startTime": "2022-10-28T09:11:18Z" // }, // "path": "/breaker/remoteHandle/position", // "body": { // "command": "open", // "reason": "Example batch command" // }, // "createdAt": "2022-08-22T00:00:00Z" // }, // { // "id": "2f088162-5b66-4bee-ad60-fd47b0c3017b", // "organizationId": "a0437cbf-c158-4543-b5c1-0ec9aab1bf6b", // "locationId": "a5db611d-d845-4a0a-9580-72444593fdd2", // "deviceIds": ["f4628c73-0c62-491a-9454-a4f1b08e98ef"], // "type": "deviceBatchCommand", // "clockSchedule": { // "startTime": "2022-10-28T09:11:18Z" // }, // "path": "/meter/settings/waveformConfiguration", // "body": { // "p0OvercurrentDuration": 100, // "p0mVSwell": 150000 // }, // "createdAt": "2022-08-22T00:00:00Z" // } // ] // } })
{- "data": [
- {
- "id": "string",
- "locationId": "string",
- "organizationId": "string",
- "type": "deviceBatchCommand",
- "deviceIds": [
- "string"
], - "clockSchedule": {
- "startTime": "string",
- "endTime": "string",
- "cronSchedule": "string",
- "timeZone": "string"
}, - "sunSchedule": {
- "scheduleType": "sunrise",
- "startTime": "string",
- "endTime": "string",
- "cronSchedule": "string",
- "offset": -60
}, - "createdAt": "2019-08-24T14:15:22Z",
- "path": "/meter/settings/waveformConfiguration",
- "body": {
- "p0OvercurrentDuration": 50,
- "p0OvercurrentEnabled": true,
- "p0mAOvercurrent": 1,
- "p0SagDuration": 50,
- "p0SagEnabled": true,
- "p0mVSag": 120000,
- "p0SwellDuration": 50,
- "p0SwellEnabled": true,
- "p0mVSwell": 120000,
- "p1OvercurrentDuration": 50,
- "p1OvercurrentEnabled": true,
- "p1mAOvercurrent": 1,
- "p1SagDuration": 50,
- "p1SagEnabled": true,
- "p1mVSag": 120000,
- "p1SwellDuration": 50,
- "p1SwellEnabled": true,
- "p1mVSwell": 120000,
- "samplesAfterTrigger": 1,
- "samplesAfterTriggerFastRMS": 1
}
}
]
}
Sends a Sun batch command to all devices within the provided location or to a specific set of devices in the provided 'Location Id' hierarchy.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
locationId required | string The Id of the Location where the devices to command are located (should be of 'Location Type' address and should have 'Coordinates'). |
deviceIds | Array of strings The Ids of the specified devices to command. |
required | object |
path required | string Value: "/meter/settings/waveformConfiguration" |
required | object (meterWaveformThresholdsConfiguration) |
{- "locationId": "string",
- "deviceIds": [
- "string"
], - "sunSchedule": {
- "scheduleType": "sunrise",
- "startTime": "string",
- "endTime": "string",
- "cronSchedule": "string",
- "offset": -60
}, - "path": "/meter/settings/waveformConfiguration",
- "body": {
- "p0OvercurrentDuration": 50,
- "p0OvercurrentEnabled": true,
- "p0mAOvercurrent": 1,
- "p0SagDuration": 50,
- "p0SagEnabled": true,
- "p0mVSag": 120000,
- "p0SwellDuration": 50,
- "p0SwellEnabled": true,
- "p0mVSwell": 120000,
- "p1OvercurrentDuration": 50,
- "p1OvercurrentEnabled": true,
- "p1mAOvercurrent": 1,
- "p1SagDuration": 50,
- "p1SagEnabled": true,
- "p1mVSag": 120000,
- "p1SwellDuration": 50,
- "p1SwellEnabled": true,
- "p1mVSwell": 120000,
- "samplesAfterTrigger": 1,
- "samplesAfterTriggerFastRMS": 1
}
}
{- "data": {
- "id": "string",
- "locationId": "string",
- "organizationId": "string",
- "type": "deviceSunBatchCommand",
- "deviceIds": [
- "string"
], - "sunSchedule": {
- "scheduleType": "sunrise",
- "startTime": "string",
- "endTime": "string",
- "cronSchedule": "string",
- "offset": -60
}, - "createdAt": "2019-08-24T14:15:22Z",
- "path": "/meter/settings/waveformConfiguration",
- "body": {
- "p0OvercurrentDuration": 50,
- "p0OvercurrentEnabled": true,
- "p0mAOvercurrent": 1,
- "p0SagDuration": 50,
- "p0SagEnabled": true,
- "p0mVSag": 120000,
- "p0SwellDuration": 50,
- "p0SwellEnabled": true,
- "p0mVSwell": 120000,
- "p1OvercurrentDuration": 50,
- "p1OvercurrentEnabled": true,
- "p1mAOvercurrent": 1,
- "p1SagDuration": 50,
- "p1SagEnabled": true,
- "p1mVSag": 120000,
- "p1SwellDuration": 50,
- "p1SwellEnabled": true,
- "p1mVSwell": 120000,
- "samplesAfterTrigger": 1,
- "samplesAfterTriggerFastRMS": 1
}
}
}
Cancel a device batch command scheduled for the future. If the batch command has already completed or is in progress, this endpoint will return a 400 Bad Request response.
id required | string The batch command id |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var id = "d51f61c3-a4a6-43d2-b3f1-252c303b84b9" var request = { "method": "DELETE", "url": `https://api.em-canary.eaton.com/api/v1/deviceBatchCommands/${id}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // No Content })
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Retrieves Details of a batch command available (via read permissions).
id required | string The batch command id |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var id = "f4628c73-0c62-491a-9454-a4f1b08e98ef" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/deviceBatchCommands/${id}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "id": "f4628c73-0c62-491a-9454-a4f1b08e98ef", // "locationId": "d51f61c3-a4a6-43d2-b3f1-252c303b84b9", // "organizationId": "a0437cbf-c158-4543-b5c1-0ec9aab1bf6b", // "deviceIds": ["f4628c73-0c62-491a-9454-a4f1b08e98ef"], // "type": "deviceBatchCommand", // "clockSchedule": { // "startTime": "2022-10-28T09:11:18Z" // }, // "path": "/breaker/remoteHandle/position", // "body": { // "command": "open", // "reason": "Example batch command" // }, // "createdAt": "2022-08-22T00:00:00Z" // } // } })
{- "data": {
- "id": "string",
- "locationId": "string",
- "organizationId": "string",
- "type": "deviceBatchCommand",
- "deviceIds": [
- "string"
], - "clockSchedule": {
- "startTime": "string",
- "endTime": "string",
- "cronSchedule": "string",
- "timeZone": "string"
}, - "sunSchedule": {
- "scheduleType": "sunrise",
- "startTime": "string",
- "endTime": "string",
- "cronSchedule": "string",
- "offset": -60
}, - "createdAt": "2019-08-24T14:15:22Z",
- "path": "/meter/settings/waveformConfiguration",
- "body": {
- "p0OvercurrentDuration": 50,
- "p0OvercurrentEnabled": true,
- "p0mAOvercurrent": 1,
- "p0SagDuration": 50,
- "p0SagEnabled": true,
- "p0mVSag": 120000,
- "p0SwellDuration": 50,
- "p0SwellEnabled": true,
- "p0mVSwell": 120000,
- "p1OvercurrentDuration": 50,
- "p1OvercurrentEnabled": true,
- "p1mAOvercurrent": 1,
- "p1SagDuration": 50,
- "p1SagEnabled": true,
- "p1mVSag": 120000,
- "p1SwellDuration": 50,
- "p1SwellEnabled": true,
- "p1mVSwell": 120000,
- "samplesAfterTrigger": 1,
- "samplesAfterTriggerFastRMS": 1
}
}
}
Gets the status for each Device in a Device Batch Command.
The possible status for each device is:
Status | Description |
---|---|
queued | Scheduled for a time in the future. |
initiated | Currently active. |
succeeded | Device batch command has completed. |
failed | Device batch command has failed. |
updated | Device batch command has been cancelled, but the start time of the command is still in the future. |
cancelled | Device batch command has been cancelled and the start time of the command has passed. |
id required | string The batch command id |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var id = "d51f61c3-a4a6-43d2-b3f1-252c303b84b9" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/deviceBatchCommands/${id}/devices`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [ // { // "deviceId": "d51f61c3-a4a6-43d2-b3f1-252c303b84b9", // "batchCommandId": "a8c835b5-5976-438d-a549-99675aa5ed7a", // "status": "succeeded", // "timestamp": "2020-09-22T14:51:35+00:00", // "startTime": "2020-09-22T14:50:35+00:00", // "scheduleType": "deviceBatchCommand" // }, // { // "deviceId": "2aec75cf-020e-4aa7-9368-74fdbc0223c5", // "batchCommandId": "a8c835b5-5976-438d-a549-99675aa5ed7a", // "status": "succeeded", // "timestamp": "2020-09-22T14:51:35+00:00", // "startTime": "2020-09-22T14:50:35+00:00", // "scheduleType": "deviceBatchCommand" // } // ] // } })
{- "data": [
- {
- "deviceId": "string",
- "batchCommandId": "string",
- "status": "queued",
- "timestamp": "string",
- "startTime": "string",
- "endTime": "string",
- "scheduleType": "deviceBatchCommand",
- "cronSchedule": "string"
}
]
}
Used to create a new stream to push data to an endpoint. Does not actually register the stream to a particular device.
To learn more about Streams, refer to the Understanding Streams topic in the Developer Portal.
The request should be structured as follows:
Parameter | Type | Required | Description | Default |
---|---|---|---|---|
description |
String | Required | Description of the stream. | N/A |
format |
String | Required | Designates the structure of the data that will be pushed to the endpoint. Possible values are azure-iot-hub or webhook . |
N/A |
azureIotHubStreamConfig |
Object | Required, if format is 'azure-iot-hub' | The options required for the requested stream format. | N/A |
webhookStreamConfig |
Object | Required, if format is 'webhook' | The options required for the requested stream format. | N/A |
NOTE: Depending on the format
, there are additional parameters required in the corresponding configuration object.
If the stream format
is azure-iot-hub
, then the azureIotHubStreamConfig
object must contain the following parameters:
Parameter | Type | Required | Description | Default |
---|---|---|---|---|
registryConnectionString |
String | Required | The Azure IoT Hub Connection String, used for device registration. | N/A |
If the stream format
is webhook
, then the webhookStreamConfig
object must contain the following parameters:
Parameter | Type | Required | Description | Default |
---|---|---|---|---|
baseUrl |
String | Required | A properly formatted HTTPs base URL for the webhook to use for publishing data | N/A |
authType |
String | Required | The authorization type that will be used to authorize requests from the device to the HTTP endpoint. Possible values are aws-request-v4-signature |
N/A |
authCredentials |
Object | Required | Contents dependent on value of authType , described further in the Understanding Streams topic in the Developer Portal. |
N/A |
validationPath |
String | Required | The path that will be used to validate the requests can be authorized when setting up the Stream. | N/A |
publishPath |
String | Required | The path that will be used to publish new data. | N/A |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
description required | string <= 256 characters The stream description. |
format required | string Value: "azure-iot-hub" The stream format. |
required | object |
{- "description": "string",
- "format": "azure-iot-hub",
- "azureIotHubStreamConfig": {
- "registryConnectionString": "string"
}
}
{- "data": {
- "id": "string",
- "description": "string",
- "format": "azure-iot-hub",
- "azureIotHubStreamConfig": {
- "registryConnectionString": "string"
}
}
}
Retrieve multiple streams.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
{- "data": [
- {
- "id": "string",
- "description": "string",
- "format": "azure-iot-hub",
- "azureIotHubStreamConfig": {
- "registryConnectionString": "string"
}
}
]
}
Retrieve a single stream.
streamId required | string Unique ID of the stream. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
{- "data": {
- "id": "string",
- "description": "string",
- "format": "azure-iot-hub",
- "azureIotHubStreamConfig": {
- "registryConnectionString": "string"
}
}
}
Delete a stream. A stream can be deleted only when no device streams (including shared device streams) are associated with it.
streamId required | string Unique ID of the stream. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var streamId = "741a51ab-3956-4470-ac38-28b8c7092ead"; var request = { "method": "POST", "url": `https://api.em-canary.eaton.com/api/v1/streams/${streamId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); //No Content })
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Creates a device stream with a given device Id and streamId.
NOTE: The limit of webhook
device streams for a device is 3. If more than 3 webhook device streams are attempted to
be created (including any shared device streams that were created by an application with shared device access), a 400 error result will be returned.
To learn more about Streams, refer to the Understanding Streams topic in the Developer Portal.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
deviceId required | string The id of the device. |
streamId required | string The id of the stream. |
{- "deviceId": "string",
- "streamId": "string"
}
{- "data": {
- "id": "string",
- "deviceId": "string",
- "streamId": "string"
}
}
Get device streams.
$filter | string Enum: "streamId eq '{streamId}'" "deviceId eq '{deviceId}'" "streamId eq '{streamId}' and deviceId eq '{deviceId}'" "deviceId eq '{deviceId}' and streamId eq '{streamId}'" Filter based on deviceId and/or streamId |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an Application auth token. var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/deviceStreams?$filter=deviceId eq 'd51f61c3-a4a6-43d2-b3f1-252c303b84b9' and streamId eq '1531628d-3a26-404b-a093-85f654765d07'`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "1919b8c9-eb28-4fa7-9405-ecb7d11f4b51", // "streamId": "1531628d-3a26-404b-a093-85f654765d07", // "deviceId": "d51f61c3-a4a6-43d2-b3f1-252c303b84b9", // }] // } })
{- "data": [
- {
- "id": "string",
- "deviceId": "string",
- "streamId": "string"
}
]
}
Retrieve a single device stream.
deviceStreamId required | string The unique device stream ID. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
{- "data": {
- "id": "string",
- "deviceId": "string",
- "streamId": "string"
}
}
Delete a single device stream.
deviceStreamId required | string The unique device stream ID. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var deviceStreamId = "1531628d-3a26-404b-a093-85f654765d07"; var request = { "method": "DELETE", "url": `https://api.em-canary.eaton.com/api/v1/deviceStreams/${deviceStreamId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); //No Content })
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Reads device stream health status.
deviceStreamId required | string The unique device stream ID. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
{- "data": {
- "dateTime": "2019-08-24T14:15:22Z",
- "message": "string",
- "streamStatusCode": 0
}
}
Assigns a UDP key to a device. Note that if there is already an active UDP key that matches this key's type and priority, that key will be unassigned.
deviceId required | string The device id. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
keyId required | string The unique ID of the key being assigned |
priority required | string Enum: "primary" "secondary" The priority for the key |
{- "keyId": "string",
- "priority": "primary"
}
{- "data": {
- "activeKeyId": "string",
- "rotatedKeyId": "string",
- "keyType": "broadcast",
- "priority": "primary"
}
}
Gets breaker remote handle position history. The results can be limited by specifying filter criteria. The 'deviceId' filter criteria is required.
Event history is paginated. If no params are provided for pagination, the default response is a limit of 1000 with 0 offset.
To use pagination, specify a limit (which cannot exceed 1000). The response will have 'next' and 'previous' uri's for viewing larger amounts of data.
$filter required | string Value: "deviceId eq '{deviceId}'" Filters for getting breaker remote handle position history |
limit | integer [ 0 .. 1000 ] Limit for returned event history records. |
offset | integer [ 0 .. 2147483647 ] Offset for pagination of returned event history records. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
{- "data": [
- {
- "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
- "timestamp": "2019-08-24T14:15:22Z",
- "handlePosition": "open",
- "source": "string"
}
], - "page": {
- "count": 0,
- "totalCount": 0,
- "offset": 0,
- "next": "string",
- "previous": "string"
}
}
Gets breaker main handle position history. The results can be limited by specifying filter criteria. The 'deviceId' filter criteria is required.
Event history is paginated. If no params are provided for pagination, the default response is a limit of 1000 with 0 offset.
To use pagination, specify a limit (which cannot exceed 1000). The response will have 'next' and 'previous' uri's for viewing larger amounts of data.
$filter required | string Value: "deviceId eq '{deviceId}'" Filters for getting breaker main handle position history |
limit | integer [ 0 .. 1000 ] Limit for returned event history records. |
offset | integer [ 0 .. 2147483647 ] Offset for pagination of returned event history records. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
{- "data": [
- {
- "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
- "timestamp": "2019-08-24T14:15:22Z",
- "mainHandlePosition": "open"
}
], - "page": {
- "count": 0,
- "totalCount": 0,
- "offset": 0,
- "next": "string",
- "previous": "string"
}
}
Get device EVSE state. Refer to Understanding Evse States for more information.
NOTE: This request will only work for an EV-EMCB.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var deviceId = "f4628c73-0c62-491a-9454-a4f1b08e98ef" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/devices/${deviceId}/evse/metadata/state`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "state": "idle", // "currentError": { // "type": "NO_ERROR", // "description": "No error" // }, // "permanentErrorFlag": false, // "ts": 1607025957 // } // } })
{- "data": {
- "state": {
- "val": "idle",
- "ts": 0
}, - "currentError": {
- "val": {
- "type": "ERROR_VENT_NOT_SUPPORTED",
- "description": "Unsupported J1772 state"
}, - "ts": 0
}, - "permanentErrorFlag": {
- "val": true,
- "ts": 0
}
}
}
Get currently applied EVSE control settings.
Please refer to the Understanding Evse Configuration, specifically the Currently Applied Settings section, for an explanation of the response for this operation.
NOTE: This request will only work for an EV-EMCB.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
{- "data": {
- "enabled": true,
- "authorized": true,
- "restrictions": {
- "maxCurrent": 0,
- "maxEnergy": 0
}
}
}
Get EVSE configuration settings and mode of operation.
Please refer to the Understanding Evse Configuration for an explanation of the behavior of the device relative to the configuration settings retrieved in this operation.
NOTE: This request will only work for an EV-EMCB.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
{- "data": {
- "mode": "no-restrictions",
- "configuration": {
- "apiConfiguration": {
- "enabled": true,
- "restrictions": {
- "maxCurrent": 6,
- "maxEnergy": 200000
}
}, - "windowConfiguration": {
- "windows": [
- {
- "start": {
- "day": "sunday",
- "time": "string"
}, - "stop": {
- "day": "sunday",
- "time": "string"
}, - "restrictions": {
- "maxCurrent": 6,
- "maxEnergy": 200000
}
}
]
}, - "offlineConfiguration": {
- "mode": "no-restrictions"
}, - "manualOverrideConfiguration": {
- "featureEnabled": true
}
}
}
}
Update EVSE configuration settings and mode of operation.
Please refer to the Understanding Evse Configuration for an explanation of the behavior of the device relative to the configuration settings applied in this operation.
NOTE: This request will only work for an EV-EMCB. NOTE: This API cannot be used when the device is using an OCPP service and will return 400 Bad Request error. NOTE: This API cannot be used when the device is actively participating in an Override Event.
deviceId required | string The device ID |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
mode | string Enum: "no-restrictions" "cloud-api" "charge-windows" "api-override-enable" "api-override-disable" The Evse mode of operation. |
object |
{- "mode": "no-restrictions",
- "configuration": {
- "apiConfiguration": {
- "enabled": true,
- "restrictions": {
- "maxCurrent": 0,
- "maxEnergy": 0
}
}, - "windowConfiguration": {
- "windows": [
- {
- "start": {
- "day": "sunday",
- "time": "string"
}, - "stop": {
- "day": "sunday",
- "time": "string"
}, - "restrictions": {
- "maxCurrent": 6,
- "maxEnergy": 200000
}
}
]
}, - "offlineConfiguration": {
- "mode": "no-restrictions"
}, - "manualOverrideConfiguration": {
- "featureEnabled": true
}
}
}
{- "data": {
- "mode": "no-restrictions",
- "configuration": {
- "apiConfiguration": {
- "enabled": true,
- "restrictions": {
- "maxCurrent": 6,
- "maxEnergy": 200000
}
}, - "windowConfiguration": {
- "windows": [
- {
- "start": {
- "day": "sunday",
- "time": "string"
}, - "stop": {
- "day": "sunday",
- "time": "string"
}, - "restrictions": {
- "maxCurrent": 6,
- "maxEnergy": 200000
}
}
]
}, - "offlineConfiguration": {
- "mode": "no-restrictions"
}, - "manualOverrideConfiguration": {
- "featureEnabled": true
}
}
}
}
Gets all plug sessions for a device. The results can be limited by specifying filter criteria. The 'deviceId' filter criteria is required.
By default, the plug sessions are ordered by 'startedAt' descending (this is without the orderby criteria), which means the most recently started plug session is the first result. The order can be specified by using the orderby criteria in the query options.
The following properties support orderby:
You can specify an order of 'asc' or 'desc' (i.e. $orderby=startedAt asc
). If the orderby criteria is used without specifying a direction (i.e. $orderby=startedAt
), the default of 'asc' is used.
Plug sessions are paginated. If no params are provided for pagination, the default response is a limit of 100 plug sessions with 0 offset.
To use pagination, specify a limit (which cannot exceed 100). The response will have 'next' and 'previous' uri's for viewing larger amounts of data.
Filters, order by, and pagination can all be combined into a single request. Below are some examples of how they can be combined.
/plugSessions?$filter=deviceId eq '16a58e26-d486-48cf-b059-861655190bb1' and stoppedAt ge 2021-11-27T08:10:36Z and stoppedAt le 2021-12-11T00:00:00Z
/plugSessions?$filter=deviceId eq '16a58e26-d486-48cf-b059-861655190bb1' and status eq 'completed' and stoppedAt ge 2021-12-11&$orderby=stoppedAt desc
/plugSessions?$filter=deviceId eq '16a58e26-d486-48cf-b059-861655190bb1' and status eq 'active' and startedAt le 2021-12-11&$orderby=startedAt
/plugSessions?$filter=deviceId eq '16a58e26-d486-48cf-b059-861655190bb1'&$orderby=stoppedAt desc&limit=1
$filter required | string Enum: "deviceId eq '{deviceId}'" "status eq '{status}'" "startedAt gt {date}" "startedAt ge {date}" "startedAt lt {date}" "startedAt le {date}" "stoppedAt gt {date}" "stoppedAt ge {date}" "stoppedAt lt {date}" "stoppedAt le {date}" Filters for getting plug sessions |
$orderby | string Enum: "startedAt {direction}" "stoppedAt {direction}" Specify the order of the plug sessions being returned |
limit | integer [ 0 .. 100 ] Limit for returned plug sessions. |
offset | integer [ 0 .. 2147483647 ] Offset for pagination of returned plug sessions. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
- "status": "active",
- "startedAt": "2019-08-24T14:15:22Z",
- "stoppedAt": "2019-08-24T14:15:22Z",
- "energyTransferred": 0,
- "ampsAverage": 0,
- "ampsMax": 0,
- "totalSecondsWithLoad": 0,
- "chargeSessions": [
- {
- "status": "active",
- "error": {
- "type": "string",
- "description": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}, - "startedAt": "2019-08-24T14:15:22Z",
- "stoppedAt": "2019-08-24T14:15:22Z",
- "energyTransferred": 0
}
]
}
], - "page": {
- "count": 0,
- "totalCount": 0,
- "offset": 0,
- "next": "string",
- "previous": "string"
}
}
Gets the telemetry data that was collected during a given plug session.
plugSessionId required | string Unique ID of the plug session |
limit | integer [ 0 .. 2147483647 ] Limit for returned plug session telemetry data. |
offset | integer [ 0 .. 2147483647 ] Offset for pagination of returned plug session telemetry data. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 128 characters Shared Secret |
{- "data": {
- "deviceId": "string",
- "results": [
- {
- "ts": 0,
- "currentA": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageAN": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "frequency": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "energy": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0
}, - "energyDelta": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0,
- "deltaTime": 0
}, - "currentB": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageBN": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageAB": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}
}
]
}, - "page": {
- "count": 0,
- "totalCount": 0,
- "offset": 0,
- "next": "string",
- "previous": "string"
}
}
Obtain a service account authorization token for an Application or an Organization.
Parameter | Type | Required | Description |
---|---|---|---|
clientId |
String | Required | The client Id. |
clientSecret |
String | Required | The client password. |
The response payload is encapsulated in a data
object, with the following parameters:
Parameter | Type | Included | Description |
---|---|---|---|
token |
String | Included | Authorization token. |
expiresAt |
String | Included | Expiry time, in ISO 8601 date time string format. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
clientId required | string <= 256 characters The client Id. |
clientSecret required | string <= 256 characters The client secret. |
{- "clientId": "string",
- "clientSecret": "string"
}
{- "data": {
- "token": "string",
- "expiresAt": "2019-08-24T14:15:22Z"
}
}
Generates a new UDP key, valid for 7 days, that can then be associated with a device for local communications support.
There is a limit to the number of UDP Keys that can be created based on the number of devices an organization has. If the limit is exceeded, the response will be a Bad Request. An existing key of the same type (unicast or broadcast) must be deleted before adding a new one once the limit has been reached.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
keyType required | string Enum: "unicast" "broadcast" The type of UDP key |
{- "keyType": "unicast"
}
{- "data": {
- "id": "string",
- "organizationId": "string",
- "value": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "keyType": "unicast",
- "deviceIds": [
- "string"
]
}
}
Retrieves the full list of active UDP keys available (via read permissions) to the account associated with the provided Authorization token.
The results can be limited by specifying filter criteria. Filtering by key type and either location ID or device ID is supported.
$filter | string Enum: "keyType eq '{keyType}'" "deviceId eq '{deviceId}'" "locationId eq '{locationId}'" "deviceId eq '{deviceId}' and keyType eq '{keyType}'" "locationId eq '{locationId}' and keyType eq '{keyType'" Filter based on device ID, location ID, or keyType |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var request = { "method": "GET", "url": "https://api.em-canary.eaton.com/api/v1/udpKeys", "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "80729846-1a9e-4e8d-bf69-7189cc8f0c0f", // "organizationId": "a0437cbf-c158-4543-b5c1-0ec9aab1bf6b", // "value": "Ejna0j4P2SfSdWn/TV0LtBObT4MXtYm1kNFO8ykXMwA=", // "expiresAt": "2020-11-29T20:19:08Z", // "keyType": "broadcast", // "deviceIds": ["f4628c73-0c62-491a-9454-a4f1b08e98ef"], // }, // { // "id": "b71282ab-1141-4022-a560-da995e6dc537", // "organizationId": "a0437cbf-c158-4543-b5c1-0ec9aab1bf6b", // "value": "GS9m90o2et7/52l8QztYjS8Wvw55DHRkyoe7BDaEQro=", // "expiresAt": "2020-11-30T20:19:08Z", // "keyType": "unicast", // "deviceIds": [], // } // ] // } })
{- "data": [
- {
- "id": "string",
- "organizationId": "string",
- "value": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "keyType": "unicast",
- "deviceIds": [
- "string"
]
}
]
}
Retrieve the UDP key with the given ID.
keyId required | string The unique ID of the UDP key. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var keyId = "80729846-1a9e-4e8d-bf69-7189cc8f0c0f"; var request = { "method": "POST", "url": `https://api.em-canary.eaton.com/api/v1/udpKeys/${keyId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "id": "80729846-1a9e-4e8d-bf69-7189cc8f0c0f", // "organizationId": "a0437cbf-c158-4543-b5c1-0ec9aab1bf6b", // "value": "Ejna0j4P2SfSdWn/TV0LtBObT4MXtYm1kNFO8ykXMwA=" // "expiresAt": "2020-11-29T20:19:08Z" // "keyType": "broadcast", // "deviceIds": [] // } // } })
{- "data": {
- "id": "string",
- "organizationId": "string",
- "value": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "keyType": "unicast",
- "deviceIds": [
- "string"
]
}
}
Deletes a UDP key. Note that if any of the devices associated with this key are unavailable, the key will remain on those devices and will not be deleted.
keyId required | string The unique ID of the UDP key. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Registers an override event webhook that will be called when a device is added to, removed from, or opted out of an override event.
Uniqueness of the webhook is based off of the provided uri
.
The additionalHeaders
that are provided during registration will be provided as a part
of the headers in the webhook call. These headers can be used as an authentication
mechanism so the EM system can be authenticated when calling the webhook. A shared secret
is recommended.
Refer to the Device Override Event Webhook request for details on how that request is structured.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
uri required | string <= 256 characters The webhook URI. |
additionalHttpHeaders | object Generic object containing any webhook headers. |
{- "uri": "string",
- "additionalHttpHeaders": { }
}
{- "data": {
- "id": "string",
- "uri": "string",
- "additionalHttpHeaders": { }
}
}
Get a list of registered override event webhooks.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var request = { "method": "GET", "url": "https://api.em-canary.eaton.com/api/v1/deviceOverrideEventWebhooks", "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "cab94a14-e276-4fe0-9907-241894e8aeb2", // "uri": "www.partner-application.com/device-override-event-webhook", // "additionalHttpHeaders": { // "Authorization": "A-Shared-Secret", // "AnotherHeader": "AnotherValue" // } // }, // { // "id": "6e79bb1d-15d2-46a5-97e5-9b33974ac5dd", // "uri": "www.partner-application.com/other-device-override-event-webhook", // "additionalHttpHeaders": { // "Authorization": "A-Shared-Secret" // } // } // ] // } })
{- "data": [
- {
- "id": "string",
- "uri": "string",
- "additionalHttpHeaders": { }
}
]
}
Gets a device override event webhook.
id required | string Unique ID of the override event webhook. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var webhookId = "ab99f0e9-86cf-49dd-bfde-272b26930565"; var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/deviceOverrideEventWebhooks/${webhookId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "id": "ab99f0e9-86cf-49dd-bfde-272b26930565", // "uri": "www.partner-application.com/device-override-event-webhook", // "additionalHttpHeaders": { // "Authorization": "A-Shared-Secret", // "AnotherHeader": "AnotherValue" // } // } // } })
{- "data": {
- "id": "string",
- "uri": "string",
- "additionalHttpHeaders": { }
}
}
Deletes a registered device override event webhook from an application.
id required | string Unique ID of the override event webhook. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var webhookId = "410bf78e-c6a3-4c53-96d3-2776349a9b3f"; var request = { "method": "DELETE", "url": `https://api.em-canary.eaton.com/api/v1/deviceOverrideEventWebhooks/${webhookId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // No Content })
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Create an Organization. The response will include a set of client credentials which will be used for generating a token for use in subsequent calls.
⚠ Copy and securely save your new secret credentials.
We will not keep these credentials for you and you will need them to access your location hierarchy, devices, and other resources.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
name required | string The name of the organization. |
description required | string The description of the organization. |
{- "name": "string",
- "description": "string"
}
{- "data": {
- "id": "string",
- "name": "string",
- "description": "string",
- "serviceAccount": {
- "clientId": "string",
- "secrets": [
- {
- "name": "string",
- "expiry": "2019-08-24T14:15:22Z",
- "value": "string"
}
]
}
}
}
Retrieve multiple organizations.
To include the permissions granted to the authenticated account for each organization, set the includePermissions
query parameter to true.
includePermissions | string Default: "false" Enum: "true" "false" Include the "permissions" field on each organization in the response. Default is |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "permissions": [
- "create:location"
], - "serviceAccount": {
- "clientId": "string",
- "secrets": [
- {
- "name": "string",
- "expiry": "2019-08-24T14:15:22Z"
}
]
}
}
]
}
Retrieve a single organization.
organizationId required | string Unique ID of the organization. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
{- "data": {
- "id": "string",
- "name": "string",
- "description": "string",
- "serviceAccount": {
- "clientId": "string",
- "secrets": [
- {
- "name": "string",
- "expiry": "2019-08-24T14:15:22Z"
}
]
}
}
}
Gets all users within an organization. Includes user access levels (Organization or Location) for each user. Users can be filter by role (i.e. 'installer').
organizationId required | string Unique ID of the organization. |
$filter | string Value: "role eq 'Installer'" Filters users by role. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an Organization auth token. // - Currently, the only property you may filter on is the `role`. // Including this query parameter will limit the users returned to only include // users that have been assigned an Installer role in this Organization. See // the endpoint documentation for more details. // - The `userAccess` field is an array of tags that describe the user's access // within the Organization. Currently, this array will consist of a single // element, either "Organization" to indicate that they have access to all // Locations/Devices within the Organizations or "Location" to indicate that // they have been assigned access at the level of individual Location(s) within // the Organization. var organizationId = "265cdaed-c4ee-47f1-a66c-0cdf9aab568e" var filter = "role eq 'Installer'" var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/organizations/${organizationId}/users?$filter=${filter}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "eaef5faa-a911-407c-ac79-e131b064aea9", // "email": "karen.smith@hotmail.com", // "userAccess": [ // "Organization" // ] // }, // { // "id": "533c7453-9764-45bc-b38d-0cdd8825d06f", // "email": "chad.smith@yahoo.com", // "userAccess": [ // "Location" // ] // } // ] // } })
{- "data": [
- {
- "id": "string",
- "email": "string",
- "userAccess": [
- "Organization"
]
}
]
}
Rotate the value of a service account secret.
⚠ Copy and securely save your updated secret credentials.
We will not keep these credentials for you and you will need them to access your location hierarchy, devices, and other resources.
serviceAccountId required | string Unique ID of the service account. |
secretName required | string Name of the secret to rotate. Valid secretNames are 'secret1' or 'secret2'. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
{- "data": {
- "name": "string",
- "expiry": "2019-08-24T14:15:22Z",
- "value": "string"
}
}
Creates a location.
A "custom" location can be created as a root level location (no parentLocationId
) or below another custom location. When creating a "custom" location, you must include a customTypeInfo
field.
An "address" location can be created as a root level location (no parentLocationId
) or below a custom location. You may not create an "address" location above or below another "address" location. When creating an "address" location, you must include an address
field. Any optional empty or whitespace entries in the address
fields are going to be removed.
An "equipment" location must be created below an "address" location. No additional fields are required for creating an "equipment" location.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
name required | string |
organizationId required | string <uuid> |
description | string |
parentLocationId | string <uuid> The id of the parent location. |
contact | string The name of the contact for the location. |
string <email> The email address for the location contact. | |
phone | string <phone> The phone number for the location contact. |
locationType required | string Value: "address" |
required | object (Address) |
object |
{- "data": {
- "id": "9e124983-31aa-40ba-a979-4bacb17fbcee",
- "name": "Address 5",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "description": "A nice location",
- "parentLocationId": "67fb6396-e2af-44f1-a41b-4b26d7bb9b49",
- "contact": "Stephanie King",
- "email": "stephanie.king@example.com",
- "phone": "1-555-555-1212",
- "locationType": "equipment"
}
}
Retrieves the full list of locations available (via read permissions) to the account associated with the provided Authorization token. The results can be limited by specifying filter criteria.
To include the permissions granted to the authenticated account for each location, set the includePermissions
query parameter to true.
$filter | string Value: "organizationId eq '{organizationId}'" Filter based on organization ID |
includePermissions | string Default: "false" Enum: "true" "false" Include the "permissions" field on each location in the response. Default is |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an appropriate auth token. var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/locations`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "cfd1375b-87ac-4d89-8848-e00c70a1fd14", // "name": "The Address Location Name", // "locationType": "address", // "description": "An example address", // "organizationId": "265cdaed-c4ee-47f1-a66c-0cdf9aab568e", // "address": { // "city": "city", // "state": "state", // "postalCode": "postalCode", // "street1": "street1", // "street2": "street2", // "coordinates": { // "latitude": "60", // "longitude": "80" // } // } // }, // { // "id": "37884e82-e81f-4932-aec0-96028aab5d0b", // "name": "The Equipment Location Name", // "locationType": "equipment", // "description": "An example equipment location", // "organizationId": "265cdaed-c4ee-47f1-a66c-0cdf9aab568e", // "parentLocationId": "cfd1375b-87ac-4d89-8848-e00c70a1fd14" // } // ] // } })
{- "data": [
- {
- "id": "9e124983-31aa-40ba-a979-4bacb17fbcee",
- "name": "Address 5",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "description": "A nice location",
- "parentLocationId": "67fb6396-e2af-44f1-a41b-4b26d7bb9b49",
- "contact": "Stephanie King",
- "email": "stephanie.king@example.com",
- "phone": "1-555-555-1212",
- "locationType": "equipment",
- "permissions": [
- "create:location"
]
}
]
}
Get information for the location with the specified ID.
To include the permissions granted to the authenticated account for this location, set the includePermissions
query parameter to true.
locationId required | string Unique ID of the location. |
includePermissions | string Default: "false" Enum: "true" "false" Include the "permissions" field in the response. Default is |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an appropriate auth token. var locationId = "cfd1375b-87ac-4d89-8848-e00c70a1fd14"; var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/locations/${locationId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "id": "cfd1375b-87ac-4d89-8848-e00c70a1fd14", // "name": "The Address Location Name", // "locationType": "address", // "description": "An example address", // "organizationId": "265cdaed-c4ee-47f1-a66c-0cdf9aab568e", // "address": { // "city": "city", // "state": "state", // "postalCode": "postalCode", // "street1": "street1", // "street2": "street2", // "coordinates": { // "latitude": "60", // "longitude": "89" // } // } // } // } })
{- "data": {
- "id": "9e124983-31aa-40ba-a979-4bacb17fbcee",
- "name": "Address 5",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "description": "A nice location",
- "parentLocationId": "67fb6396-e2af-44f1-a41b-4b26d7bb9b49",
- "contact": "Stephanie King",
- "email": "stephanie.king@example.com",
- "phone": "1-555-555-1212",
- "locationType": "equipment",
- "permissions": [
- "create:location"
]
}
}
Updates the location with the specified ID.
This endpoint does not support updating the organizationId
or the locationType
.
Including the parentLocationId
field in the request body will move the location (and any of the location's descendants) to a different parent, provided that the new parentLocationId
still satisfies the location hierarchy requirements.
If parentLocationId
is provided in the request as null or an empty string, the location will become a root level location (the parentLocationId will be set to null).
If an address
field is included in the request body, but the location is not an "address" location, the request will fail with a 400 Bad Request result.
Likewise, if customTypeInfo
is included in the request body, but the location is not a "custom" location, the request will fail with a 400 Bad Request result.
locationId required | string Unique ID of the location. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
parentLocationId | string The id of the location's parent. |
name | string |
description | string |
contact | string The name of the contact for the location. |
string The email address for the location contact. | |
phone | string The phone number for the location contact. |
object | |
object |
{- "parentLocationId": "string",
- "name": "Building 5",
- "description": "string",
- "contact": "string",
- "email": "string",
- "phone": "string",
- "address": {
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "street1": "string",
- "street2": "string",
- "coordinates": {
- "latitude": "string",
- "longitude": "string"
}
}, - "customTypeInfo": {
- "customLocationName": "string",
- "customLocationDescription": "string"
}
}
{- "data": {
- "id": "9e124983-31aa-40ba-a979-4bacb17fbcee",
- "name": "Address 5",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "description": "A nice location",
- "parentLocationId": "67fb6396-e2af-44f1-a41b-4b26d7bb9b49",
- "contact": "Stephanie King",
- "email": "stephanie.king@example.com",
- "phone": "1-555-555-1212",
- "locationType": "equipment"
}
}
Deletes a location. Deleting locations with child locations or devices is not supported, and will result in a 400 Bad Request. Deleting a location will also delete any user invites that exclusively target the deleted location.
locationId required | string Unique ID of the location. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Retrieves assignable roles.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "ORGANIZATION_AUTH_TOKEN" with an appropriate auth token. var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/roles`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {ORGANIZATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "ee4c3c74-ab67-8fa8-47c7-947167799051", // "name": "Installer" // }] // } })
{- "data": [
- {
- "id": "string",
- "name": "string"
}
]
}
Assigns a role to a user.
If the user has not yet created an EM account through the install app, this API creates a "pending" user role, that is activated when the user creates and verifies their account. Otherwise, the user role is activated immediately through this API.
skipNotificationEmail | boolean Choose to skip sending an email to the user when their role is changed. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
locationId required | string Id of the location to assign this user to. |
roleId required | string The role id. |
email required | string <email> The user email. |
{- "organizationId": "string",
- "roleId": "string",
- "email": "user@example.com"
}
{- "data": {
- "id": "string",
- "roleId": "string",
- "email": "user@example.com",
- "status": "pending",
- "inviteType": "email",
- "locationId": "string"
}
}
Gets all assigned user roles and their status for an organization.
$filter | string Value: "status eq '{status}'" Filter based on role status |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an Organization auth token. var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/userRoles`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "37086961-615f-4b4b-aeec-bfc433bd8c87", // "email": "karen.smith@hotmail.com", // "roleId": "ee4c3c74-ab67-8fa8-47c7-947167799051", // "organizationId": "265cdaed-c4ee-47f1-a66c-0cdf9aab568e", // "status": "pending", // "inviteType": "email" // }, // { // "id": "b8f2f22c-c495-44eb-ab1f-051aae231db6", // "email": "joe.smith@gmail.com", // "roleId": "f0b4bfe5-750a-4165-addd-6050e1430d4d", // "organizationId": "265cdaed-c4ee-47f1-a66c-0cdf9aab568e", // "status": "active", // "inviteType": "inviteCode" // }] // } })
{- "data": [
- {
- "id": "string",
- "roleId": "string",
- "email": "user@example.com",
- "status": "pending",
- "inviteType": "email",
- "locationId": "string"
}
]
}
Deletes a user role.
This API deletes the user role regardless of its status ('pending' or 'active').
If the user role has an 'inviteType' of 'inviteCode', then the associated user acceptance will also be cleared.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
locationId required | string Id of the location to assign this user to. |
roleId required | string The role id. |
email required | string <email> The user email. |
{- "organizationId": "string",
- "roleId": "string",
- "email": "user@example.com"
}
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Creates a user invitation code, with optional restrictions on usage.
Users can claim this code at a later date in order to gain privileges at the given location or organization.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
locationId required | string Location ID associated with the invite code; grants access to this location and its children |
roleId required | string The role ID |
object (inviteCodeRestrictions) |
{- "organizationId": "string",
- "roleId": "string",
- "restrictions": {
- "userLimit": 0,
- "emailDomain": "string",
- "expirationDate": "2019-08-24T14:15:22Z"
}
}
{- "data": {
- "locationId": "string",
- "roleId": "string",
- "code": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "userAcceptances": [
- {
- "id": "string",
- "userId": "string",
- "email": "string",
- "joinedDate": "2019-08-24T14:15:22Z"
}
], - "restrictions": {
- "userLimit": 0,
- "emailDomain": "string",
- "expirationDate": "2019-08-24T14:15:22Z"
}
}
}
Get a list of invite codes.
The following filter options are supported:
Some examples of filtering include:
/inviteCodes?$filter=scope eq 'organization'
/inviteCodes?$filter=locationId eq '1e6940cf-9419-4c85-bbfd-12610f36739c' and isActive eq true
$filter | string Enum: "scope eq '{scope}'" "locationId eq '{locationId}'" "isActive eq {isActive}" Filter based on scope, locationId, or isActive status. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an Organization auth token. var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/inviteCodes`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "code": "s3qvzujs98gz", // "roleId": "ee4c3c74-ab67-8fa8-47c7-947167799051", // "organizationId": "265cdaed-c4ee-47f1-a66c-0cdf9aab568e", // "restrictions": { // "userLimit": 100, // "emailDomain": "mail.eaton.com", // "expirationDate": "2022-09-22T00:00:00Z", // }, // "userAcceptances": [{ // "id": "3f8e87c4-1a3c-45e8-b060-e1d4223cbd87", // "userId": "09be74c2-660f-44a8-a26f-86be0edd3447", // "email": "karen.smith@hotmail.com", // "joinedDate": "2022-09-01T00:00:00Z", // }], // "createdAt": "2022-08-22T00:00:00Z" // }] // } })
{- "data": [
- {
- "locationId": "string",
- "roleId": "string",
- "code": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "userAcceptances": [
- {
- "id": "string",
- "userId": "string",
- "email": "string",
- "joinedDate": "2019-08-24T14:15:22Z"
}
], - "restrictions": {
- "userLimit": 0,
- "emailDomain": "string",
- "expirationDate": "2019-08-24T14:15:22Z"
}
}
]
}
Get invite code details
code required | string The invite code |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an Organization auth token. var code = "s3qvzujs98gz"; var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/inviteCodes/${code}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "code": "s3qvzujs98gz", // "roleId": "ee4c3c74-ab67-8fa8-47c7-947167799051", // "organizationId": "265cdaed-c4ee-47f1-a66c-0cdf9aab568e", // "restrictions": { // "userLimit": 100, // "emailDomain": "mail.eaton.com", // "expirationDate": "2022-09-22T00:00:00Z", // }, // "userAcceptances": [{ // "id": "3f8e87c4-1a3c-45e8-b060-e1d4223cbd87", // "userId": "09be74c2-660f-44a8-a26f-86be0edd3447", // "email": "karen.smith@hotmail.com", // "joinedDate": "2022-09-01T00:00:00Z", // }], // "createdAt": "2022-08-22T00:00:00Z" // } // } })
{- "data": {
- "locationId": "string",
- "roleId": "string",
- "code": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "userAcceptances": [
- {
- "id": "string",
- "userId": "string",
- "email": "string",
- "joinedDate": "2019-08-24T14:15:22Z"
}
], - "restrictions": {
- "userLimit": 0,
- "emailDomain": "string",
- "expirationDate": "2019-08-24T14:15:22Z"
}
}
}
Deactivate an invite code by advancing its expiration date to the current time.
If the code is already past its expiration date, a Conflict result is returned.
If a code's user limit is exceeded, the operation will still succeed and the expiration date will be set to the current time.
Users that have already claimed the invite code will retain their permissions.
code required | string Unique invite code. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Organization Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "AUTH_TOKEN" with an Organization auth token. var code = "s3qvzujs98gz"; var request = { "method": "DELETE", "url": `https://api.em-canary.eaton.com/api/v1/inviteCodes/${code}/deactivation`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // No Content })
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Registers a user permissions webhook. This webhook is called every time a user's permissions within the application hierarchy change.
Uniqueness of the webhook is based off of the provided uri
.
The additionalHeaders
that are provided during registration will be provided as a part
of the headers in the webhook call. These headers can be used as an authentication
mechanism so the EM system can be authenticated when calling the webhook. A shared secret
is recommended.
Refer to the User Permission Webhook request for details on how that request is structured.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
uri required | string <= 256 characters The webhook URI. |
additionalHttpHeaders | object Generic object containing any webhook headers. |
{- "uri": "string",
- "additionalHttpHeaders": { }
}
{- "data": {
- "id": "string",
- "uri": "string",
- "additionalHttpHeaders": { }
}
}
Get a list of registered user permission webhooks.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var request = { "method": "GET", "url": "https://api.em-canary.eaton.com/api/v1/userPermissionWebhooks", "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "b63aa516-6a6f-4371-a29f-0a90f163f9d5", // "uri": "www.partner-application.com/user-permission-webhook", // "additionalHttpHeaders": { // "Authorization": "A-Shared-Secret", // "AnotherHeader": "AnotherValue" // } // }, // { // "id": "c27398a4-3597-41eb-b196-99b480b5723a", // "uri": "www.partner-application.com/other-user-permission-webhook", // "additionalHttpHeaders": { // "Authorization": "A-Shared-Secret" // } // } // ] // } })
{- "data": [
- {
- "id": "string",
- "uri": "string",
- "additionalHttpHeaders": { }
}
]
}
Gets a user permission webhook.
webhookId required | string Unique ID of the user permission webhook. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var webhookId = "72f1ba28-4c94-4d4f-b7a6-5ac178e07c49"; var request = { "method": "GET", "url": `https://api.em-canary.eaton.com/api/v1/userPermissionWebhooks/${webhookId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "id": "72f1ba28-4c94-4d4f-b7a6-5ac178e07c49", // "uri": "www.partner-application.com/user-permission-webhook", // "additionalHttpHeaders": { // "Authorization": "A-Shared-Secret", // "AnotherHeader": "AnotherValue" // } // } // } })
{- "data": {
- "id": "string",
- "uri": "string",
- "additionalHttpHeaders": { }
}
}
Delete a registered user permissions webhook from an application.
webhookId required | string Unique ID of the user permission webhook. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var webhookId = "72f1ba28-4c94-4d4f-b7a6-5ac178e07c49"; var request = { "method": "DELETE", "url": `https://api.em-canary.eaton.com/api/v1/userPermissionWebhooks/${webhookId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // No Content })
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Get all the resource quotas for the Application.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
{- "data": [
- {
- "resourceType": "string",
- "current": 0,
- "limit": 0,
- "scope": "application",
- "scopeId": "string"
}
]
}
Used to create a new OCPP Central System. Does not actually register the OCPP Central System to a particular device.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
websocketBaseUrl required | string The websocket endpoint of the OCPP Central System. |
{- "websocketBaseUrl": "string"
}
{- "data": {
- "id": "string",
- "websocketBaseUrl": "string"
}
}
Get all OCPP Central Systems created for the Application.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var request = { "method": "GET", "url": "https://api.em-canary.eaton.com/api/v1/ocppCentralSystems", "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "1531628d-3a26-404b-a093-85f654765d07", // "websocketBaseUrl": "wss://centralsystem.example.com/ocpp" // }, // { // "id": "599913a3-e34d-40a2-ae25-15070a4fbd06", // "websocketBaseUrl": "wss://centralsystem.example.com/other-ocpp" // }] // } })
{- "data": [
- {
- "id": "string",
- "websocketBaseUrl": "string"
}
]
}
Get a single OCPP Central System by Id.
ocppCentralSystemId required | string Unique ID of the OCPP central system. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var ocppCentralSystemId = "1531628d-3a26-404b-a093-85f654765d07"; var request = { "method": "GET", "url": "https://api.em-canary.eaton.com/api/v1/ocppCentralSystems/${ocppCentralSystemId}", "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "id": "1531628d-3a26-404b-a093-85f654765d07", // "websocketBaseUrl": "wss://centralsystem.example.com/ocpp" // } // } })
{- "data": {
- "id": "string",
- "websocketBaseUrl": "string"
}
}
Delete an existing Central System.
Note that a Central System can only be deleted if there are no existing Charge Points registered to it. If you wish to delete a Central System, be sure to delete its Charge Points first.
ocppCentralSystemId required | string Unique ID of the OCPP central system. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var centralSystemId = "741a51ab-3956-4370-ac38-28b8c7092ead"; var request = { "method": "DELETE", "url": `https://api.em-canary.eaton.com/api/v1/ocppCentralSystem/${centralSystemId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); //No Content })
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
Register device as a new Charge Point to an OCPP Central System. This request will fail if establishing a connection between the Charge Point and the Central System fails. If no password is provided in the request, then authentication will be ignored.
NOTE: If the device is offline, this request will fail and the new Charge Point will not be registered to the OCPP Central System.
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
ocppCentralSystemId required | string The OCPP Central System id |
deviceId required | string The OCPP Device Id |
password | string The OCPP Charge Point Password |
chargePointIdentifier | string The OCPP Charge Point Identifier |
{- "ocppCentralSystemId": "string",
- "deviceId": "string",
- "password": "string",
- "chargePointIdentifier": "string"
}
{- "data": {
- "id": "string",
- "ocppCentralSystemId": "string",
- "deviceId": "string",
- "chargePointIdentifier": "string",
- "ocppCentralSystemUrl": "string"
}
}
Get all OCPP Charge Points created for the Application. The results can be limited by specifying filter criteria.
Filtering on 'ocppCentralSystemId' returns a list of charge points associated with the provided ocppCentralSystemId.
Filtering on 'deviceId' returns a list with only the charge point of the provided deviceId.
$filter | string Enum: "ocppCentralSystemId eq '{ocppCentralSystemId}'" "deviceId eq '{deviceId}'" Filter based on ocppCentralSystemId or deviceId or both |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var ocppCentralSystemId = "1531628d-3a26-404b-a093-85f654765d07"; var filter = `ocppCentralSystemId eq '${ocppCentralSystemId}'`; var request = { "method": "GET", "url": "https://api.em-canary.eaton.com/api/v1/ocppChargePoints?$filter=${filter}", "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": [{ // "id": "e98bfed3-0765-45a2-9fd0-0a6c883f86a0", // "ocppCentralSystemId": "1531628d-3a26-404b-a093-85f654765d07", // "deviceId": "d51f61c3-a4a6-43d2-b3f1-252c303b84b9", // "chargePointIdentifier": "special-id", // "ocppCentralSystemUrl": "ws://centralsystem.example.com/ocpp" // }, // { // "id": "a5db611d-d845-4a0a-9580-72444593fdd2", // "ocppCentralSystemId": "1531628d-3a26-404b-a093-85f654765d07", // "deviceId": "2f088162-5b66-4bee-ad60-fd47b0c3017b", // "chargePointIdentifier": "another-special-id", // "ocppCentralSystemUrl": "ws://centralsystem.example.com/ocpp" // }] // } })
{- "data": [
- {
- "id": "string",
- "ocppCentralSystemId": "string",
- "deviceId": "string",
- "chargePointIdentifier": "string",
- "ocppCentralSystemUrl": "string"
}
]
}
Get a single OCPP Charge Point by Id.
ocppChargePointId required | string Unique ID of the charge point. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var ocppChargePointId = "e98bfed3-0765-45a2-9fd0-0a6c883f86a0"; var request = { "method": "GET", "url": "https://api.em-canary.eaton.com/api/v1/ocppChargePoints/${ocppChargePointId}", "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); // { // "data": { // "id": "e98bfed3-0765-45a2-9fd0-0a6c883f86a0", // "ocppCentralSystemId": "1531628d-3a26-404b-a093-85f654765d07", // "deviceId": "d51f61c3-a4a6-43d2-b3f1-252c303b84b9", // "chargePointIdentifier": "special-id", // "ocppCentralSystemUrl": "ws://centralsystem.example.com/ocpp" // } // } })
{- "data": {
- "id": "string",
- "ocppCentralSystemId": "string",
- "deviceId": "string",
- "chargePointIdentifier": "string",
- "ocppCentralSystemUrl": "string"
}
}
Unregister the charge point from the device.
ocppChargePointId required | string Unique ID of the charge point. |
Em-Api-Subscription-Key required | string <= 128 characters Smart Breaker API Key |
Authorization required | string <= 2000 characters Application Service Account Token in Bearer format |
const axios = require('axios'); //NOTES: // - Remember to replace "SMART_BREAKER_API_KEY" with your own API Key. // - Remember to replace "APPLICATION_AUTH_TOKEN" with an Application auth token. var ocppChargePointId = "741a51ab-3956-4370-ac38-28b8c7092ead"; var request = { "method": "POST", "url": `https://api.em-canary.eaton.com/api/v1/ocppChargePoints/${ocppChargePointId}`, "headers": { "Em-Api-Subscription-Key": "{SMART_BREAKER_API_KEY}", "Authorization": "Bearer {APPLICATION_AUTH_TOKEN}", "Accept": "application/json", "Content-Type": "application/json" } } axios(request).then(function(response){ console.log(response.data); //No Content })
{- "error": {
- "message": "string",
- "validations": [
- {
- "message": "string",
- "propertyName": "string"
}
]
}
}
NOTE: This is a POST request.
Information about a device that has just been commissioned in the system.
NOTE: This request is initiated by the EM System for all devices that are commissioned if a Device Onboarding Webhook has been registered using the POST /deviceWebhooks operation.
deviceId required | string <uuid> The id of the device. |
serialNumber required | string The serial number of this device. |
deviceSku required | string Enum: "BREM1015" "BREM1020" "BREM2030" "BABEM1015" "BABEM1020" "BABEM2030" The SKU of this device. |
hardwareType required | string Enum: "emcb" "ev-emcb" Hardware type. |
userId required | string <uuid> The ID of the installer that commissioned the device. |
organizationId required | string <uuid> The ID of the organization that the device is assoicated with. |
parentLocationId required | string <uuid> The device's parent location ID. |
chargerStationId | string The ID for the charger station. Only included for |
object Details including type, model and manufacturer's name. |
{- "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
- "serialNumber": "string",
- "deviceSku": "BREM1015",
- "hardwareType": "emcb",
- "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "parentLocationId": "7c3a5b0e-d172-4ccd-83a4-1483006217d2",
- "chargerStationId": "string",
- "loadDetails": {
- "type": "air-conditioner",
- "manufacturerName": "string",
- "modelName": "string"
}
}
NOTE: This is a GET request.
EM Device initiates this request during the Stream setup process (for a Webhook stream) to ensure that the service that will authenticate and ingest data is properly functioning.
NOTE: This request is initiated by the EM System for all devices that have been configured with a DeviceStream that is associated to a Stream of type "webhook".
For signature calculation and validation to support authentication, the following specifics are true of the EM API implementation of the AWS Request v4 Signing Process:
region
, the value will be global
service
, the value will be eatonem-agent-stream
host
(the service base url, without the protocol string)To learn more about Streams, refer to the Understanding Streams topic in the Developer Portal.
Authorization required | string Refer to this documentation and the request description for EM API implementation specifics. |
X-Amz-Date required | string Refer to this documentation. |
Host required | string The domain from the |
NOTE: This is a POST request.
An EM Device initiates this request when it has any new data to publish.
The data sent via Streams to the specified backend corresponds to the data channels described below.
Every payload will contain the relevant data for the channel that is reporting new data, as well as the following top-level keys:
deviceId
- The Device Identifier of the device that is reporting new data.serialNumber
- The Serial Number of the device that is reporting new data.schemaVersion
- The schema version, to be used in parsing reported data.transactionId
- A unique transaction identifier for auditing and
traceability.ts
- The epoch timestamp, in seconds, at which the push was made to the
stream.For both Azure IoT Hub and Webhook streams, data is sent in the standard stream data format.
In addition to the deviceId
, serialNumber
, schemaVersion
, transactionId
,
and ts
keys, all updated channel data is included in the request under it's
corresponding top-level key in the payload.
To illustrate the point, the following example Accelerometer telemetry payload (note that the key "accelerometer" is included a root-level key):
//Accelerometer Telemetry payload example
{
"deviceId": "<device-id>",
"serialNumber": "<serial-number>",
"schemaVersion": "<schema-version>",
"transactionId": "<v1-uuid>",
"ts": 1600794161,
"accelerometer": {
"telemetry": {
"x": {
"min": 0,
"max": 1,
"avg": 0.5,
"val": 0.5
},
"y": {
"min": 0,
"max": 1,
"avg": 0.5,
"val": 0.5
},
"z": {
"min": 0,
"max": 1,
"avg": 0.5,
"val": 0.5
},
"ts": 1556636190,
"hwSamples": 2
}
}
}
NOTE: This request is initiated by the EM System for all devices that have been configured with a DeviceStream that is associated to a Stream of type "webhook".
For signature calculation and validation to support authentication, the following specifics are true of the EM API implementation of the AWS Request v4 Signing Process:
region
, the value will be global
service
, the value will be eatonem-agent-stream
host
(the service base url, without the protocol string)content-type
if the request body is not emptyapplication/x-amz-json-1.0
To learn more about Streams, refer to the Understanding Streams topic in the Developer Portal.
Authorization required | string Refer to this documentation and the request description for EM API implementation specifics. |
X-Amz-Date required | string Refer to this documentation. |
Host required | string The domain from the |
Content-Length required | string Request body content length. |
Content-Type required | string Value: "application/x-amz-json-1.0" |
deviceId required | string The Device Identifier of the device that is reporting new data. |
serialNumber required | string The Serial Number of the device that is reporting new data. |
schemaVersion required | string Default: "4.2.0.beta" The schema version, to be used in parsing reported data. |
transactionId required | string A unique transaction identifier for auditing and traceability. |
ts required | number The epoch timestamp, in seconds, at which the push was made to the stream. |
object Collection of data that describes the | |
object Collection of data that describes the | |
object Collection of data that describes the | |
object Collection of data that describes the | |
object Collection of data that describes the | |
object Collection of data that describes the | |
object Collection of data that describes the | |
object Collection of data that describes the |
{- "deviceId": "string",
- "serialNumber": "string",
- "schemaVersion": "4.2.0.beta",
- "transactionId": "string",
- "ts": 0,
- "accelerometer": {
- "telemetry": {
- "x": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "y": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "z": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "ts": 0,
- "hwSamples": 0
}
}, - "breaker": {
- "metadata": {
- "ratedVoltage": {
- "val": 120,
- "ts": 0
}, - "ratedCurrent": {
- "val": 15,
- "ts": 0
}, - "interruptingCurrent": {
- "val": 10000,
- "ts": 0
}, - "numPoles": {
- "val": 1,
- "ts": 0
}, - "totalPoles": {
- "val": 2,
- "ts": 0
}, - "lineTerminalStyle": {
- "val": "PLUG-ON",
- "ts": 0
}, - "mainHandlePosition": {
- "val": true,
- "ts": 0
}
}, - "settings": {
- "remoteHandlePosition": {
- "val": true,
- "ts": 0
}, - "underVoltageReleaseEnabled": {
- "val": true,
- "ts": 0
}
}
}, - "device": {
- "telemetry": {
- "lightLevel": {
- "val": 65336,
- "min": 65336,
- "max": 65336,
- "avg": 65336
}, - "deviceFreeMemory": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "agentFreeMemory": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "rssi": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "ts": 0,
- "hwSamples": 0
}, - "metadata": {
- "isConnected": {
- "val": true,
- "ts": 0
}, - "numBoots": {
- "val": 0,
- "ts": 0
}, - "numWakeReasonException": {
- "val": 0,
- "ts": 0
}, - "macAddress": {
- "val": "string",
- "ts": 0
}, - "ipAddress": {
- "val": "string",
- "ts": 0
}, - "bootROM": {
- "val": "string",
- "ts": 0
}, - "osDevice": {
- "val": "string",
- "ts": 0
}, - "osAgent": {
- "val": "string",
- "ts": 0
}, - "idDeployment": {
- "val": "string",
- "ts": 0
}
}
}, - "evse": {
- "metadata": {
- "state": {
- "val": "idle",
- "ts": 0
}, - "enabled": {
- "val": true,
- "ts": 0
}, - "authorized": {
- "val": true,
- "ts": 0
}, - "numBoots": {
- "val": 0,
- "ts": 0
}, - "currentError": {
- "val": {
- "type": "ERROR_VENT_NOT_SUPPORTED",
- "description": "Unsupported J1772 state"
}, - "ts": 0
}, - "permanentErrorFlag": {
- "val": true,
- "ts": 0
}
}, - "settings": {
- "mode": {
- "val": "no-restrictions",
- "ts": 0
}, - "apiConfiguration": {
- "val": {
- "enabled": true,
- "restrictions": {
- "maxCurrent": 0,
- "maxEnergy": 0
}
}, - "ts": 0
}, - "windowConfiguration": {
- "val": {
- "windows": [ ]
}, - "ts": 0
}, - "ocppConfiguration": {
- "val": {
- "enabled": true
}, - "ts": 0
}, - "offlineConfiguration": {
- "val": {
- "type": null,
- "enum": null
}, - "ts": 0
}
}
}, - "meter": {
- "telemetry": {
- "currentA": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "currentB": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageAN": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageBN": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "voltageAB": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "frequency": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "rawEnergy": {
- "q1mJpA": 0,
- "q2mJpA": 0,
- "q3mJpA": 0,
- "q4mJpA": 0,
- "q1mJpB": 0,
- "q2mJpB": 0,
- "q3mJpB": 0,
- "q4mJpB": 0,
- "q1mVARspA": 0,
- "q2mVARspA": 0,
- "q3mVARspA": 0,
- "q4mVARspA": 0,
- "q1mVARspB": 0,
- "q2mVARspB": 0,
- "q3mVARspB": 0,
- "q4mVARspB": 0
}, - "rawEnergyDelta": {
- "q1mJpA": 0,
- "q2mJpA": 0,
- "q3mJpA": 0,
- "q4mJpA": 0,
- "q1mJpB": 0,
- "q2mJpB": 0,
- "q3mJpB": 0,
- "q4mJpB": 0,
- "q1mVARspA": 0,
- "q2mVARspA": 0,
- "q3mVARspA": 0,
- "q4mVARspA": 0,
- "q1mVARspB": 0,
- "q2mVARspB": 0,
- "q3mVARspB": 0,
- "q4mVARspB": 0,
- "deltaTime": 0
}, - "energy": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0
}, - "energyDelta": {
- "delivered": 0,
- "generated": 0,
- "deliveredWH": 0,
- "generatedWH": 0,
- "deltaTime": 0
}, - "ts": 0,
- "hwSamples": 0
}, - "events": {
- "waveformCaptured": { },
- "fastRMSCaptured": { }
}, - "metadata": {
- "loadPresent": {
- "val": true,
- "ts": 0
}, - "loadState": {
- "val": 0,
- "ts": 0
}
}, - "settings": {
- "loadPresentThreshold": {
- "val": 0,
- "ts": 0
}, - "waveformConfiguration": {
- "val": {
- "pAOvercurrentDuration": 0,
- "pAOvercurrentEnabled": true,
- "pASagDuration": 0,
- "pASagEnabled": true,
- "pASwellDuration": 0,
- "pASwellEnabled": true,
- "pAmAOvercurrent": 0,
- "pAmVSag": 0,
- "pAmVSwell": 0,
- "pBOvercurrentDuration": 0,
- "pBOvercurrentEnabled": true,
- "pBSagDuration": 0,
- "pBSagEnabled": true,
- "pBSwellDuration": 0,
- "pBSwellEnabled": true,
- "pBmAOvercurrent": 0,
- "pBmVSag": 0,
- "pBmVSwell": 0,
- "samplesAfterTrigger": 0,
- "samplesAfterTriggerFastRMS": 0
}, - "ts": 0
}
}
}, - "thermometer": {
- "telemetry": {
- "temperature": {
- "val": 0,
- "min": 0,
- "max": 0,
- "avg": 0
}, - "ts": 0,
- "hwSamples": 0
}
}, - "telemetry": {
- "settings": {
- "alignment": {
- "val": "none",
- "ts": 0
}
}
}, - "bargraph": {
- "settings": {
- "mode": {
- "val": "track-meter-data",
- "ts": 0
}, - "colors": {
- "val": {
- "led1": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led2": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led3": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led4": {
- "red": 255,
- "green": 255,
- "blue": 255
}, - "led5": {
- "red": 255,
- "green": 255,
- "blue": 255
}
}, - "ts": 0
}
}
}
}
NOTE: This is a POST request.
Provides information about how a user's permissions within an application hierarchy have changed.
This request is initiated by the EM System in the following scenarios:
permissionChangeType
is 'assigned'.permissionChangeType
is 'invited'.permissionChangeType
is 'assigned'.permissionChangeType
is 'revoked'permissionChangeType
is 'cancelled'.permissionChangeType
is 'assigned'.locationId required | string ID of the location that permissions were assigned to or revoked from. |
email required | string The email address of the user whose permissions have changed. |
timestamp required | string The time that the user permissions were changed, in ISO 8601 date time string format. |
roleId required | string The role ID. |
inviteType required | string Enum: "email" "inviteCode" The invite type of the assigned or revoked user role. |
permissionChangeType required | string Enum: "assigned" "cancelled" "invited" "revoked" Describes how the user's permissions have changed:
|
{- "organizationId": "string",
- "email": "string",
- "timestamp": "string",
- "roleId": "string",
- "inviteType": "email",
- "permissionChangeType": "assigned"
}
NOTE: This is a POST request.
Provides information about a change to a device's participation status in an override event.
This request is initiated by the EM System in the following scenarios:
deviceId required | string The ID of the device which has had its override event participation status changed. |
deviceOverrideEventId required | string The ID of the shared device override event that the device has either been added to, removed from, or opted out of. |
deviceOwnerOrganizationId required | string The ID of the organization that owns the device. |
eventCreatorOrganizationId required | string The ID of the organization that created the shared device override event. |
eventCreatorOrganizationName required | string The name of the organization that created the shared device override event. |
updatedAt required | string The time that the device's override event participation status changed, in ISO 8601 date time string format. |
status required | string Enum: "participating" "removed" "optedOut" Describes how the device's override event participation status has changed:
|
{- "deviceId": "string",
- "deviceOverrideEventId": "string",
- "deviceOwnerOrganizationId": "string",
- "eventCreatorOrganizationId": "string",
- "eventCreatorOrganizationName": "string",
- "updatedAt": "string",
- "status": "participating"
}