Eaton Smart Breaker API (1.19.0)

Download OpenAPI specification:Download

Smart Breaker API Overview

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.

NOTE: The Smart Breaker Preview API can be found here and contains upcoming additions and changes that are in preview.

Prerequisites

Application Credentials and API Key

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.

End User Management

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:

  • Smart Breaker Device IDs and details.
  • Smart Breaker Location IDs and details.

Information about the Application, its Organizations, and their respective Service Accounts should not be exposed to the Application's end-users.

Developer Portal

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!

Support

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.

Commands for Specific Device Types

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.

SB Only Operations

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).

EV Only Operations

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).

Release Notes

Version Release Date Summary
v1.19.0 2023-11-29 Contains additions.
v1.18.0 2023-10-16 Contains improvements, changes, and fixes.
v1.17.0 2023-08-02 Contains removals, improvements, changes, and fixes.
v1.16.0 2023-06-21 Contains additions and changes.
v1.15.0 2023-03-30 Contains additions, and improvements.
v1.14.0 2023-03-06 Contains additions, changes. deprecations, improvements, removals, and documentation updates.
v1.13.0 2022-12-14 Contains additions.
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.
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 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.

v1.19.0 - 2023-11-29

Added

  • Local Communication is now supported for EV Chargers

v1.18.0 - 2023-10-16

Changed

  • The description for "errorSupplyVoltage" evse error has been updated
  • The description for "errorSolenoidPowerFail" evse error has been updated

Improvements

  • The POST /sharedDeviceOverrideEvents API now accepts optional description field
  • The GET /sharedDeviceOverrideEvents and GET /sharedDeviceOverrideEvents/{id} APIs can now also return a description
  • The GET /sharedDeviceOverrideEvents API now also supports filtering by endTime.
    • If no startTime or endTime is provided, the events will be filtered to those that end after the current time instead of those that start after the current time.
    • The results are limited to the first 500 records instead of the first 50.
  • The /sharedDeviceOverrideEvents resource endpoints now include the name of the organization that created the override event (createdByOrganizationName).
  • eventCreatorOrganizationName is now included in the payload for the device override event webhook.
  • /shareDeviceCodes resource endpoints now include the name of the organization that created, claimed, relinquished, or revoked the share code (createdByOrganizationName, claimedByOrganizationName, relinquishedByOrganizationName, revokedByOrganizationName)
  • deviceOwnerOrganizationName and claimingOrganizationName are now included in the payload for the share device code webhook.

Fixed

  • The GET /deviceData?$filter=deviceId eq '{deviceId}' endpoint now returns the telemetry.settings.alignment and telemetry.settings.dataReportRate data even before those settings have been explicitly configured.

v1.17.0 - 2023-08-02

Removed

  • The deprecated endpoints and query parameters for device streams have been removed:
    • The GET /deviceStreamStatus endpoint has been removed. The GET /deviceStreams/{id}/status endpoint should be used to get status information for a device stream by ID instead.
    • The DELETE /deviceStreams endpoint has been removed. The DELETE /deviceStreams/{id} endpoint should be used to delete device streams by ID instead.
    • The deprecated query parameters for GET /deviceStreams are now removed. The $filter query parameter should be used instead of separate deviceId and streamId query params.

Improvements

  • The PATCH /devices/{id} endpoint now allows updating load details.
  • The GET /devices/{id} and GET /devices endpoints can now also return loadDetails.
  • loadDetails are now included in the payload for the device onboarding webhook data if provided during commissioning.
  • The GET /shareDeviceCodes/{code}/deviceSummary response body now includes the deviceHardwareType and the shareCodeStatus. And, the organization that claimed the code now also maintains read access to the share code device summary after the code has been revoked or relinquished.
  • The POST /shareDeviceCodes/{code} API now sends a 400 response for devices that are configured to use OCPP.
  • The POST /ocppChargePoints API will revoke any shared device access that was previously configured.
  • The /sharedDeviceOverrideEvents resource endpoints now work for an EV device.

Changed

  • The PATCH /devices/{deviceId}/evse/settings/configuration endpoint will respond with 400 BadRequest if the device is actively participating in an Override Event.

Fixed

  • Fixed the values for the status of shared device override events in the API documentation.

v1.16.0 - 2023-06-21

Changed

  • The GET /deviceBatchCommands/{id}/devices endpoint will now return deviceBatchCommand or deviceSunBatchCommand as a value for scheduleType.
  • Breaking Change: The PATCH /devices/{deviceId}/evse/settings/configuration endpoint now expects the maxEnergy restriction to be in watt-hours instead of kilowatt-hours.
  • The POST /deviceStreams endpoint now prevents registering the same stream multiple times on one device.
  • The POST /devices/{deviceId}/breaker/remoteHandle/remoteHandlePosition endpoint will not accept secondsUntilReset if the device is actively participating in an Override Event.
  • Physical Behavior: The LED display on the EV Smart Breaker Charger showing meter current will now be based on the 32 amp limit of the charger instead of the 40 amp limit of the breaker.

Added

  • The following operations have been added to the /devices resource.
    • The GET /devices/{deviceId}/data/telemetry/meter/reading endpoint can be used to get the current breaker meter reading.
  • The /shareDeviceCodes resource has been added:
    • The POST /shareDeviceCodes endpoint can be used to create a share device code that other organizations can use to gain limited access to a device.
    • The POST /shareDeviceCodes/{code}/claim endpoint can be used to claim a share device code.
    • The POST /shareDeviceCodes/{code}/revocation endpoint can be used to revoke a share device code.
    • The POST /shareDeviceCodes/{code}/relinquishment endpoint can be used to relinquish a share device code.
    • The GET /shareDeviceCodes/{code} endpoint can be used to get the details of a share device code by the organization who created it or an organization who claimed it.
    • The GET /shareDeviceCodes endpoint can be used to get a list of share device codes, with support for filtering by 'status', 'action', and 'deviceId'.
    • The GET /shareDeviceCodes/{code}/deviceSummary endpoint can be used to get a preview of the device associated with a share code before claiming it.
  • The /shareDeviceCodeWebhooks resource has been added:
    • The POST /shareDeviceCodeWebhooks endpoint can be used to register a webhook that will be called when share device codes are claimed, relinquished, or revoked.
    • The GET /shareDeviceCodeWebhooks/{id} endpoint can be used to retrieve an individual share device code webhook.
    • The GET /shareDeviceCodeWebhooks endpoint can be used to get a list of registered share device code webhooks.
    • The DELETE /shareDeviceCodeWebhooks/{id} endpoint can be used to delete an individual share device code webhook.
  • The sharedDevices resource has been added:
    • The GET /sharedDevices endpoint can be used to the details for all shared devices claimed by an Organization.
    • The GET /sharedDevices/{id} endpoint can be used to get the details of a shared device by the Organization that claimed it.
  • The /sharedDeviceStreams resource has been added:
    • The POST /sharedDeviceStreams endpoint can be used to add a device shared with an application to a stream that application owns.
    • The GET /sharedDeviceStreams/{id}/status endpoint can be used to check the status of a shared device stream.
    • The GET /sharedDeviceStreams/{id} endpont can be used to get details for an individual shared device stream association.
    • The GET /sharedDeviceStreams endpoint can be used to get a list of shared device streams.
    • The DELETE /sharedDeviceStreams/{id} endpoint can be used to remove a stream association for a device shared with an application
  • The /sharedDeviceOverrideEvents resource has been added:
    • The POST /sharedDeviceOverrideEvents endpoint can be used to create an override event that shared devices can then be assigned to.
    • The GET /sharedDeviceOverrideEvents/{eventId} endpoint can be used to retrieve an individual shared device override event.
    • The GET /sharedDeviceOverrideEvents endpoint can be used to get a list of shared device override events that were created by the current user's organization or affect one or more of the user's devices.
    • The POST /sharedDeviceOverrideEvents/{eventId}/sharedDeviceParticipations endpoint can be used to assign shared devices to an override event.
    • The POST /sharedDeviceOverrideEvents/{eventId}/sharedDeviceRemovals endpoint can be used to remove devices from participating in an override event. This is only accessible to users who belong to the organization that created the override event.
    • The POST /sharedDeviceOverrideEvents/{eventId}/sharedDeviceOptouts endpoint can be used to opt devices out from participating in an override event. This is only accessible to the device owner.
    • The GET /sharedDeviceOverrideEvents/{eventId}/sharedDeviceParticipations endpoint can be used to get a list of participations assigned to the override event.
    • The POST /sharedDeviceOverrideEvents/{eventId}/cancellation endpoint can be used to cancel an override event if all device participations are opted out or removed. This is only accessible to users who belong to the organization that created the override event.
  • The /deviceOverrideEventWebhooks resource has been added:
    • The POST /deviceOverrideEventWebhooks endpoint can be used to register a webhook that will be called when devices are added to, removed from, or opted out of a shared device override event.
    • The GET /deviceOverrideEventWebhooks/{id} endpoint can be used to retrieve an individual device override event webhook.
    • The GET /deviceOverrideEventWebhooks endpoint can be used to get a list of registered device override event webhooks.
    • The DELETE /deviceOverrideEventWebhooks/{id} endpoint can be used to delete an individual device override event webhook.

v1.15.0 - 2023-03-30

Improvements

  • The POST /deviceBatchCommands endpoint now accepts timeZone as an optional parameter which can be used to make cron execution of batch command as per the timezone. It will also return timeZone as a response if it is provided.
  • The GET /deviceBatchCommands/{id} and GET /deviceBatchCommands endpoints can now also return timeZone in clockSchedule.

Added

  • The following operations have been added to the /devices resource.
    • The POST /devices/{deviceId}/restart endpoint can be used to perform a soft reboot of the device, including applying any pending firmware updates.

v1.14.0 - 2023-03-06

Added

  • The deviceSunBatchCommands resource has been added:
    • The POST /deviceSunBatchCommands endpoint can be used create a batchCommand that respects sunrise or sunset.

Changed

  • The GET /deviceStreams endpoint now accepts using the $filter query parameter instead of separate deviceId and streamId query params.
    • The query parameters will still function but are now considered deprecated.
    • The $filter param cannot be used at the same time as the deviceId/streamId params.
    • It will now return 200 OK with an empty list instead of a 403 Forbidden if the caller is not authorized to view the requested resources.
  • The GET /deviceStreamStatus endpoint (and its replacement, GET /deviceStreams/{id}/status) now returns a 404 response instead of a 400 response when a device ID or stream ID is provided instead of a deviceStream ID.

Deprecated

  • The GET /deviceStreamStatus endpoint has been deprecated. The GET /deviceStreams/{id}/status endpoint should be used to get status information for a device stream by ID instead.
  • The DELETE /deviceStreams endpoint has been deprecated. The DELETE /deviceStreams/{id} endpoint should be used to delete device streams by ID instead.

Improvements

  • The POST /locations endpoint now accepts coordinates as an optional parameter in type address which can be used to store latitude and longitude of the location. It will also return coordinates as a response if it is provided
  • The GET /locations and GET /locations/{locationId} endpoints now also returns the stored coordinates value for locations
  • The PATCH /locations/{locationId} endpoint can now also be used to update coordinates's latitude and longitude
  • The GET /deviceBatchCommands/{id} endpoint now also returns sunSchedule information for sun batch command.
  • The GET /deviceBatchCommands endpoint now also returns sunSchedule information for sun batch command.
  • The GET /deviceBatchCommands endpoint now also supports filtering on type.
  • The POST /ocppChargePoints , GET /ocppChargePoints and GET /ocppChargePoints/{ocppChargePointId} endpoints now returns ocppCentralSystemUrl in the response
  • chargerStationId is now included in the payload for the device onboarding webhook data for EV devices.
  • chargerStationId is now included in the device details info for EV devices.

Removed

  • The deprecated /users/roles endpoints have been removed:
    • The GET /users/roles endpoint has been removed. The GET /roles endpoint should be used to retrieve assignable roles instead.
    • The POST /users/roles endpoint has been removed. The POST /userRoles endpoint should be used to assign a role to a user instead.
    • The DELETE /users/roles endpoint has been removed. The DELETE /userRoles endpoint should be used to remove a user role assignment.
  • The deprecated endpoints for legacy partner user management have been removed from the partner and preview APIs. The EM Developer Portal should be used to manage developer accounts and application service accounts instead.
    • The POST /users/my/password and POST /users/passwordResets endpoints have been removed.
    • The POST /partners and PATCH /partners/{id} endpoints have been removed.
    • The POST /tokens, POST /tokens/my, and DELETE /tokens/my endpoints have been removed.

Documentation

  • Add 429 Too Many Requests to the list of responses for POST /devices/{deviceId}/breaker/remoteHandle/remoteHandlePosition endpoint.

v1.13.0 - 2022-12-14

Added

  • The following operations have been added to the /devices resource.
    • The GET /devices/{deviceId}/evse/metadata/state endpoint can be used to get EVSE state information for an individual device. Will return the latest current error that the EVSE micro has recorded.
    • The GET /devices/{deviceId}/evse/metadata/controlConfiguration endpoint can be used to get EVSE control configuation for an individual device.
    • The PATCH /devices/{deviceId}/evse/settings/configuration endpoint can be used to set/update the EVSE configuration settings individual device.
    • The GET /devices/{deviceId}/evse/settings/configuration endpoint can be used to get the EVSE configuration settings for an individual device
  • The /ocppCentralSystems resource has been added:
    • The POST /ocppCentralSystems operation can be used to create a new OCPP Central System.
    • The GET /ocppCentralSystems operation can be used to get all OCPP Central Systems a partner has created.
    • The GET /ocppCentralSystems/{ocppCentralSystemId} operation can be used to get a single OCPP Central System by Id.
    • The DELETE /ocppCentralSystems/{ocppCentralSystemId} operation can be used to delete a Central System.
  • The /ocppChargePoints resource has been added:
    • The POST /ocppChargePoints operation can be used to register a new OCPP Charge Point to a device.
    • The GET /ocppChargePoints operation can be used to get all OCPP Charge Points a partner has created. Filtering on central system ID, device ID or both is supported.
    • The GET /ocppChargePoints/{ocppChargePointId} operation can be used to get a single OCPP Charge Point by Id.
    • The DELETE /ocppChargePoints/{ocppChargePointId} operation can be used to unregister an OCPP Charge Point from a device.
  • The /plugSessions resource has been added
    • The GET /plugSessions?$filter=deviceId eq '{deviceId}' operation can be used to get plug sessions for a device. Filtering on a device ID (required) and status. Added filters (gt, ge, lt, le) on startedAt and stoppedAt for valid UTC dates. Can order by startedAt or stoppedAt. Request is paginated with query parameters for limit and offset.
    • The GET /plugSessions/{plugSessionId}/meterTelemetryData operation can be used to get the telemetry data collected during a specific plug session. Request is paginated with query parameters for limit and offset.

v1.12.0 - 2022-12-05

Added

  • The following operations have been added to the /inviteCodes resource.
    • The POST /inviteCodes/{code}/deactivation endpoint can be used to deactivate an invite code. Existing user acceptances will remain unaffected.
  • The /userPermissionWebhooks resource has been added:
    • The POST /userPermissionWebhooks endpoint can be used to register a webhook that will be called when user permissions within an application hierarchy are changed.
    • The GET /userPermissionsWebhooks endpoint can be used to get a list of registered user permission webhooks.
    • The GET /userPermissionsWebhooks/{webhookId} endpoint can be used to retrieve an individual user permission webhook.
    • The DELETE /userPermissionsWebhooks/{webhookId} endpoint can be used to delete an individual user permission webhook.
  • The following operations have been added to the /deviceBatchCommands resource.
    • The GET /deviceBatchCommands endpoint can be used to get the list of batch command details.
    • The GET /deviceBatchCommands/{id} endpoint can be used to get details of a batch command.

Changed

  • The PATCH /devices/{deviceId}/evse/settings/configuration endpoint now forces the time and day properties on windows to match the formats specified in the docs. Window days must be lowercase and equal to sunday, monday, tuesday, wednesday, thursday, friday or saturday. Window times must be a 4 digit 24-hour time. Ex: 1300, 0900, 2345.
  • The POST /inviteCodes endpoint no longer has a default or maximum value of 100 for the user limit restriction.

Improvements

  • The POST /deviceBatchCommands endpoint now returns a complete object which includes locationId, organizationId, type, deviceIds, clockSchedule, createdAt, path and body

Fixed

  • An issue that was preventing BatchCommands from executing after one hour of scheduling.

v1.11.0 - 2022-09-28

Added

  • The /inviteCodes resource has been added:
    • The POST /inviteCodes endpoint can be used to create an invite code that users can claim to gain access to a given location/organization.
    • The GET /inviteCodes/{code} endpoint can be used to get a created invite code, including details about invite code usage restrictions and a list of user acceptances for the code.
    • The GET /inviteCodes endpoint can be used to get a list of invite codes, with support for filtering by scope, locationId, or isActive status.

Changed

  • The POST /userRoles and GET /userRoles response bodies now contain an inviteType field that describes how the user role was assigned.
  • The DELETE /locations endpoint will now cleanup user invites that exclusively target the deleted location.
  • Physical Behavior: The physical behavior of the standard Smart Breaker (aka EMCB) Display button has been updated as follows:
    • Press (regardless of hold):
      • Enable blinkup (commissioning) for 5 minutes
    • Press and hold:
      • Display WiFi Signal Strength

Improvements

  • The POST /deviceBatchCommands endpoint now accepts endTime as an optional input parameter for cron schedules.
  • The GET /deviceBatchCommands/{id}/devices endpoint now also returns the endTime for cron schedules.
  • Emails sent from the API will now come from: "blsupport@eaton.com".

v1.10.3 - 2022-08-16

Improvements

  • serialNumber is now included in the payload for the device onboarding webhook data.
  • DELETE /devices/{deviceId} endpoint now returns 503 Device Unavailable when the device is offline.

Fixed

  • An issue that would cause GET /devices/{deviceId}/breaker/remoteHandle/secondsUntilReset to respond with an empty object when there was no active timer. Now, the response returns 0 for the value of the timer if no timer is active.

v1.10.2 - 2022-06-24

Changed

  • Physical Behavior: The physical behavior of the standard Smart Breaker (aka EMCB) Display button has been updated as follows:
    • Press (no hold):
      • Enable blinkup (commissioning) for 5 minutes (previously, this was 1 minute)
    • Press and hold:
      • Display WiFi Signal Strength

v1.10.1 - 2022-05-25

Fixed

  • Fixed an issue that could cause local communication to fail after momentary network connection loss.

v1.10.0 - 2022-04-22

Added

  • The following operations have been added to the /eventHistory resource.
    • The GET /eventHistory/breakerMainHandlePosition?$filter=deviceId eq '{deviceId}' operation can be used to get remote main handle position historical data. Filtering on a device ID (required).

Changes

  • Limit the number of device streams of type webhook to 3 for a device.

Improvements

  • The POST /locations endpoint now supports creating an address and equipment locations in one call.

Documentation

v1.9.1 - 2022-02-24

Improvements

  • The GET /deviceData?$filter=deviceId eq '{deviceId}' endpoint now also returns the meter.settings.loadPresentThreshold, telemetry, and bargraph data.

v1.9.0 - 2022-02-11

Added

  • The following operations have been added to the /devices resource.
    • The PUT /devices/{deviceId}/telemetry/settings/alignment operation can be used to set the alignment setting for the device.

Changed

  • Added an optional skipNotificationEmail parameter to the POST /userRoles endpoint query params. This field will determine if the user will be emailed when their role is changed. Defaults to false which sends an email.
  • The POST /deviceBatchCommands operation now supports the /telemetry/settings/alignment path.

Documentation

v1.8.0 - 2022-01-18

Added

  • The /eventHistory resource has been added
    • The GET /eventHistory/breakerRemoteHandlePosition?$filter=deviceId eq '{deviceId}' operation can be used to get remote meter handle position historical data. Filtering on a device ID (required).

Improvements

  • Improve main handle position detection to better suit a wider variety of deployments
  • Email sent from the API will now come from: "smartbreaker@eaton.com"

Fixed

  • Fixed an issue that could cause streams to fail to initialize for some devices at restart

Documentation

  • Following the release of the Smart Breaker Developer Portal:
    • The "Energy Management" naming has updated to "Smart Breaker" throughout the documentation. All request URIs have been maintained and there are no functional differences with the naming update.
    • References to Partners have been replaced with Applications in most cases

Deprecated

  • The following operations have been deprecated following the release of the Smart Breaker Developer Portal
    • POST /users/my/password (Change Password)
    • POST /users/passwordResets (Reset Password)
    • POST /partners (Activate Partner Account)
    • PATCH /partners/{partnerId} (Update Partner Account)
    • POST /tokens (Obtain User Authorization Token)
    • POST /tokens/my (Refresh User Authorization Token)
    • DELETE /tokens/my (Invalidate User Authorization Token)

v1.7.0 - 2021-11-22

Added

  • The **/deviceData resource has been added
    • The GET /deviceData?$filter=deviceId eq '{deviceId}' operation can be used to get latest data for a device. Filtering on a device ID (required).

v1.6.1 - 2021-11-16

Changed

  • Some improvements and bug fixes.

v1.6.0 - 2021-10-19

Added

  • The /resourceQuotas resource has been added:
    • The GET /resourceQuotas endpoint can be used to get the current resource usage and limit details.

Fixed

  • Fixed issue with GET /devices endpoint where a partner can get duplicate entries if the partner is also added as an installer.
  • Fixed issue with POST /locations endpoint where empty optional fields are returning BadRequest.
  • Fixed issue with POST /udpKeys endpoint where expired keys are counted against the key limit.
  • Fixed issue with GET /deviceStreamsStatus where it was returning a 200 response code when the uuid provided was not a device stream.

Improvements

  • The POST /deviceBatchCommands endpoint now supports Unix cron schedules.
  • The POST /deviceBatchCommands endpoint now also supports sending commands to a specific set of devices.
  • The GET /deviceBatchCommands/{id}/devices endpoint now also returns the startTime, scheduleType, and cronSchedule.
  • The GET /devices endpoint now also supports filtering on serial number.

Documentation

  • Update Webhook Stream details for correctness (rename numSamples to hwSamples for telemetry data to match implementation)

v1.5.0 - 2021-08-27

Added

  • The following operations have been added to the /devices resource.
    • The GET /devices/{deviceId} endpoint can be used to get a single device.

Improvements

  • Reliability improvements for device commands
  • Reliability improvements for waveform captures across multiple devices at the same time
  • Reliability improvements for IoTHub Device Stream connectivity

Documentation

  • Update Webhook Stream details for correctness and include an SDK recommendation
  • Update code samples to use axios instead of $.ajax
  • Add breaker.metadata.mainHandlePositon to Stream Publish Payload

v1.4.1 - 2021-07-23

This release contains bugfixes.

Fixed

  • Fix issue with verification link in user registration email

v1.4.0 - 2021-07-13

This release contains additions, documentation updates, and internal improvements.

Added

  • The following operations have been added to the /streams resource.

    • The DELETE /streams/{streamId} endpoint can be used to remove a stream.
  • The following operations have been added to the /devices resource.

    • The POST /devices/{deviceId}/waveforms endpoint can be used to record an immediate waveform.

Documentation

  • Added Release Notes section (this section!) to API Documentation
  • Added Webhooks collection of API calls to API Documentation

v1.3.1 - 2021-04-22

This release contains bugfixes.

Fixed

  • Fixed issue with POST /userRoles and DELETE /userRoles operations.

v1.3.0 - 2021-04-08

This release contains updates and additions, including support for Local Communications.

Added

  • The /udpKeys resource has been added:
    • The POST /udpKeys operation can be used to generate a new keys for local communications.
    • The GET /udpKeys operation can be used to retrieve multiple UDP keys.
    • The GET /udpKeys/{keyId} operation can be used to get an individual UDP key.
    • The DELETE /udpKeys/{keyId} operation can be used to delete a UDP key.
  • The following operations have been added to the /devices resource.
    • The GET /devices/{deviceId}/meter/settings/waveformConfiguration operation can be used to get waveform configuration settings for an individual device.
    • The POST /devices/{deviceId}/udpKeys operation can be used to assign a UDP key to a device.

Updates

v1.2.0 - 2021-02-22

This release contains additions, updates, bugfixes and deprecations.

Added

  • The /userRoles resource has been added:
    • The POST /userRoles operation can be used to invite and assign permissions to new and existing users.
    • The GET /userRoles operation can be used to view all assigned permissions to users in an org, along with their status ("pending" or "active").
    • The DELETE /userRoles operation can be used to delete a user’s role (regardless of permission grant status).
  • The /roles resource has been added:
    • The GET /roles endpoint can be used to retrieve a list of assignable roles.
  • Additions to the Streams payload
    • The property mainHandlePosition has been added to the breaker metadata section of the stream payload (breaker.metadata.mainHandlePosition)
    • The property loadState has been added to the meter metadata section of the stream payload (meter.metadata.loadState)

Fixed

  • Fixed an issue that would cause the bargraph display to show current usage relative to 30A (instead of the breaker’s handle rating) when in track-meter-data mode.

Updates

  • Updates to Streams payloads:
    • The root-level property schemaVersion has been updated to 4.2.0.beta (to reflect the inclusion of mainHandlePosition and loadState).
  • Documentation updates:
    • The Manage Installers section of the API Overview includes:
      • An overview of how to use the new /roles and /userRoles resources
      • Links to the EM Install application on both platforms (iOS and Android)
    • The Understanding Streams section has been added to the API Overview
      • Much of the documentation was moved from the POST /streams operation description
      • Added documentation to better describe the Webhook Stream

Deprecated

  • The /users/roles and contained operations have been deprecated.
    • The POST /userRoles operation should be used to assign a role to a user (previously performed by the POST /users/roles operation)
    • The DELETE /userRoles operation should be used to remove a role from a user (previously performed by the DELETE /users/roles operation)
    • The GET /roles operation should be used to retrieve a list of assignable user roles (previously performed by the GET /users/roles operation)

v1.1.1 - 2021-01-06

This release contains bugfixes.

Fixed

  • Addressed a bug that prevented a successful re-commissioning of a device that has been decommissioned.

v1.1.0 - 2020-12-14

This release contains additions, updates, and bugfixes.

Added

  • The following operations have been added to the /devices resource.
    • The PATCH /devices/{deviceId} operation can be used to re-parent a device to a new location within the same organization.
    • The PUT /devices/{deviceId}/bargraph/settings/mode operation can be used to set the device's bargraph mode.
    • The GET /devices/{deviceId}/bargraph/settings/mode operation can be used to get the device's bargraph mode.
    • The PUT /devices/{deviceId}/bargraph/settings/colors operation can be used to set the device's bargraph colors.
    • The GET /devices/{deviceId}/bargraph/settings/colors operation can be used to get the device's bargraph colors.
    • The GET /devices/{deviceId}/breaker/remoteHandle/secondsUntilReset operation can be used to get the number of seconds until the breaker's remote handle will reset
    • The GET /devices/{deviceId}/device/metadata/isConnected operation can be used to get the device's connection state
    • The PUT /devices/{deviceId}/meter/settings/loadPresentThreshold operation can be used to set the load present threshold for a device.
    • The GET /devices/{deviceId}/meter/settings/loadPresentThreshold operation can be used to get the load present threshold for a device.
    • The GET /devices/{deviceId}/waveforms operation can be used to get summaries of waveforms for a device.
    • The GET /devices/{deviceId}/waveforms/{waveformId} operation can be used to get details of a waveform for a device.
  • The following operations have been added to the /deviceBatchCommands resource
    • The DELETE /deviceBatchCommands/{id} operation can be used to cancel a device batch command scheduled for a future start time.

Fixed

  • Addressed a bug that sometimes caused device commands to fail with a 503.
  • Addressed a bug that would cause some meter-related commands to timeout.
  • Addressed a bug that would cause the initial data payload that is pushed to a new stream when it is set up to be encapsulated in an unexpected "data" property.

Updates

  • The POST /devices/{deviceId}/breaker/remoteHandle/position operation has been updated to support the following optional features:
    • secondsUntilReset was added as an optional parameter to re-close the breaker (after an open operation) after secondsUntilReset seconds
  • The POST /deviceBatchCommands operation has been updated to support the following new commands:
    • /bargraph/settings/mode
    • /bargraph/settings/colors
    • /meter/settings/loadPresentThreshold
  • Updates to Streams payloads:
    • serialNumber has been added to the root of all device stream payloads and maps to the Legacy Smart Breaker Platform idDevice key
    • The schemaVersion in device stream payloads has been updated to v4.1.0.beta (reflecting the update to include serialNumber in the payload)
  • Documentation updates:
    • The Streams documentation has been updated to include previously-missing and new payload information

v1.0.0 - 2020-09-29

Initial Production Release.

Added

  • The following operations have been added to the /deviceBatchCommands resource:
    • The GET /deviceBatchCommands/{id}/devices operation can be used to get status of device batch command.

Fixed

  • Update Device Streams to make the following changes to the root of the streams push payload:
    • idAgent updated to deviceId
    • idTransaction updated to transactionId
    • ts is added for all stream push payloads
  • Ignore waveform if triggered immediately on bootup

Updates

  • Partner accounts can no longer be used to perform a number of operations, including: managing locations, managing installer users, or controlling devices. An organization service account token must be used instead.
Attribution

App Store is a registered trademark of Apple Inc.

Google Play and the Google Play logo are trademarks of Google LLC

Device Management

Register Device Onboarding Webhook

Description

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Request Body schema: application/json
uri
required
string <= 256 characters

The webhook URI.

additionalHttpHeaders
object

Generic object containing any webhook headers.

Responses

Request samples

Content type
application/json
{
  • "uri": "string",
  • "additionalHttpHeaders": { }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Device Onboarding Webhooks

Description

Retrieves the full list of device onboarding webhooks available (via read permissions) to the account associated with the provided Authorization token.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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"
    //             }
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single Device Webhook

Description

Gets a device onboarding webhook.

path Parameters
webhookId
required
string

Unique ID of the device webhook.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Unregister Device Onboarding Webhook

path Parameters
webhookId
required
string

Unique ID of the device webhook.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get Devices

Description

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.

query Parameters
$filter
string
Enum: "locationId eq '{locationId}'" "ancestorLocationId eq '{ancestorLocationId}'" "serialNumber eq '{serialNumber}'"

Filter based on locationId or ancestorLocationId or serialNumber

header Parameters
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

Responses

Request samples

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.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"
    //             }
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Device

Description

Retrieves the device information.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    //         }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Decommission Device

Description

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.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Update Device Details

Description

This endpoint can be used to update a variety of details about the device, including its parent location and connected load information.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "locationId": "string",
  • "loadDetails": {
    }
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Restart Device

Description

Performs a soft reboot of the device. This allows pending firmware updates to be applied.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Device Commands

Get Device Remote Handle Position

Get the device's remote handle position

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set Device Remote Handle Position SB Only

Description

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'.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "command": "open",
  • "reason": "string",
  • "secondsUntilReset": 3600
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get Seconds Until Remote Handle Resets SB Only

Description

Get seconds until remote handle resets. Value will be 0 if no timer is active.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Device Connection State

Get device connection state

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Configure Device Meter Waveform Thresholds

Configure meter waveform thresholds for a device.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "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
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get Current Device Meter Waveform Thresholds Configuration

Get the current meter waveform thresholds configuration for a device.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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
    //   }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Configure Device Meter Load Present Threshold

Configure the meter load present threshold for a device.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
loadPresentThreshold
integer >= 1

The load present threshold in milliAmps.

Responses

Request samples

Content type
application/json
{
  • "loadPresentThreshold": 1
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get Device Meter Load Present Threshold

Gets the meter load present threshold for a device.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set Telemetry Alignment

Description

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.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
alignment
required
string
Enum: "none" "clock"

The alignment setting of telemetry.

Responses

Request samples

Content type
application/json
{
  • "alignment": "none"
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Set Bargraph Mode

Description

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.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
mode
required
string
Enum: "track-meter-data" "user-defined"

The bargraph mode of operation.

Responses

Request samples

Content type
application/json
{
  • "mode": "track-meter-data"
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get Bargraph Mode.

Description

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.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set Bargraph Colors

Description

Configure the bargraph colors. NOTE: These colors will only take effect if the bargraph mode is configured as user-defined.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "led1": {
    },
  • "led2": {
    },
  • "led3": {
    },
  • "led4": {
    },
  • "led5": {
    }
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get Bargraph Colors

Description

Get the user-defined bargraph colors setting. NOTE: These colors will only take effect if the bargraph mode is configured as user-defined.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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
    //     }
    //   }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Creates and records an immediate a waveform capture from the device.

Description

Creates and records immediate a waveform from the device. If streams are configured, the waveform will be piped out to the configured streams.

path Parameters
deviceId
required
string

The device id.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 128 characters

Shared Secret

Responses

Request samples

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.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"
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Gets the summaries of waveforms for a device

Description

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.

path Parameters
deviceId
required
string

The device id.

query Parameters
$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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    //        }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get waveform details for a device

Description

Gets the full details of a waveform for a device.

path Parameters
deviceId
required
string

The device id.

waveformId
required
string

The waveform id.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Historical Meter Telemetry Data

Description

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.

path Parameters
deviceId
required
string

The device id.

query Parameters
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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "page": {
    }
}

Get Most Recent Meter Telemetry Data

Description

Retrieves the latest Meter Telemetry data pushed from the device.

path Parameters
deviceId
required
string

The device id.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Meter Telemetry Reading

Description

Retrieves the current meter telemetry reading from the device.

path Parameters
deviceId
required
string

The device id.

header Parameters
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

Responses

Request samples

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.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
    //    }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Latest Device Data

Description

Retrieves the latest data pushed from the device. The 'deviceId' filter criteria is required.

Filters

  • 'deviceId' filter is required.
query Parameters
$filter
required
string
Value: "deviceId eq '{deviceId}'"

Filters for getting latest device data

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    //    }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Device Batch Commands

Send Device Batch Command

Description

Sends a batch command to all devices within the provided location or to a specific set of devices anywhere in the hierarchy.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
One of
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)

Responses

Request samples

Content type
application/json
Example
{
  • "locationId": "string",
  • "deviceIds": [
    ],
  • "startTime": "string",
  • "endTime": "string",
  • "cronSchedule": "string",
  • "timeZone": "America/New_York",
  • "path": "/meter/settings/waveformConfiguration",
  • "body": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get List of Batch Command Details

Description

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

query Parameters
$filter
string
Enum: "locationId eq '{locationId}'" "type eq '{type}'"

Filter based on locationId or type

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Send Device Sun Batch Command

Description

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
One of
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)

Responses

Request samples

Content type
application/json
Example
{
  • "locationId": "string",
  • "deviceIds": [
    ],
  • "sunSchedule": {
    },
  • "path": "/meter/settings/waveformConfiguration",
  • "body": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Cancel a device batch command

Description

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.

path Parameters
id
required
string

The batch command id

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get Single Batch Command Details

Description

Retrieves Details of a batch command available (via read permissions).

path Parameters
id
required
string

The batch command id

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
  //    }
  //   }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Batch Command Device Status

Description

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.
path Parameters
id
required
string

The batch command id

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    //        }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Device Streams

Create Stream

Description

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.

Request

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
header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Request Body schema: application/json
One of
description
required
string <= 256 characters

The stream description.

format
required
string
Value: "azure-iot-hub"

The stream format.

required
object

Responses

Request samples

Content type
application/json
Example
{
  • "description": "string",
  • "format": "azure-iot-hub",
  • "azureIotHubStreamConfig": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Streams

Description

Retrieve multiple streams.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single Stream

Description

Retrieve a single stream.

path Parameters
streamId
required
string

Unique ID of the stream.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete Stream

Description

Delete a stream. A stream can be deleted only when no device streams (including shared device streams) are associated with it.

path Parameters
streamId
required
string

Unique ID of the stream.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Create Device Stream

Description

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Request Body schema: application/json
deviceId
required
string

The id of the device.

streamId
required
string

The id of the stream.

Responses

Request samples

Content type
application/json
{
  • "deviceId": "string",
  • "streamId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Device Streams

Description

Get device streams.

query Parameters
$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

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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",
    //     }]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single Device Stream

Description

Retrieve a single device stream.

path Parameters
deviceStreamId
required
string

The unique device stream ID.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Remove Device Stream

Description

Delete a single device stream.

path Parameters
deviceStreamId
required
string

The unique device stream ID.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get Device Stream Status

Description

Reads device stream health status.

path Parameters
deviceStreamId
required
string

The unique device stream ID.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Device UDP Keys

Assigns a UDP key to a device

Description

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.

path Parameters
deviceId
required
string

The device id.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
keyId
required
string

The unique ID of the key being assigned

priority
required
string
Enum: "primary" "secondary"

The priority for the key

Responses

Request samples

Content type
application/json
{
  • "keyId": "string",
  • "priority": "primary"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Breaker Events

Get Breaker Remote Handle Position History

Description

Gets breaker remote handle position history. The results can be limited by specifying filter criteria. The 'deviceId' filter criteria is required.

Filters

  • 'deviceId' filter is required.

Pagination

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.

query Parameters
$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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

Get Breaker Main Handle Position History

Description

Gets breaker main handle position history. The results can be limited by specifying filter criteria. The 'deviceId' filter criteria is required.

Filters

  • 'deviceId' filter is required.

Pagination

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.

query Parameters
$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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

EVSE Commands

Get Device EVSE State EV Only

Description

Get device EVSE state. Refer to Understanding Evse States for more information.

NOTE: This request will only work for an EV-EMCB.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Currently Applied EVSE Control Settings EV Only

Description

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.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get EVSE Configuration Settings and Mode EV Only

Description

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.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update EVSE Configuration Settings and Mode EV Only

Description

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.

path Parameters
deviceId
required
string

The device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
mode
string
Enum: "no-restrictions" "cloud-api" "charge-windows" "api-override-enable" "api-override-disable"

The Evse mode of operation.

object

Responses

Request samples

Content type
application/json
{
  • "mode": "no-restrictions",
  • "configuration": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Plug Sessions

Get Plug Sessions EV Only

Description

Gets all plug sessions for a device. The results can be limited by specifying filter criteria. The 'deviceId' filter criteria is required.

Filters

  • 'deviceId' filter is required.
  • 'status' filter option returns plug sessions with either the 'active' or 'completed' status.
  • 'startedAt' allows 'gt' (greater than), 'ge' (greater than or equal), 'lt' (less than), and 'le' (less than or equal) filters for valid ISO time stamps (i.e. 2021-11-27T08:10:36Z or 2021-11-27T12:10:36-04:00) or dates (i.e. 2021-11-27).
  • 'stoppedAt' allows 'gt' (greater than), 'ge' (greater than or equal), 'lt' (less than), and 'le' (less than or equal) filters for valid ISO time stamps (i.e. 2021-11-27T08:10:36Z or 2021-11-27T12:10:36-04:00) or dates (i.e. 2021-11-27).

Order By

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:

  • startedAt
  • stoppedAt

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.

Pagination

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.

Usage of Multiple Query Parameters

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

query Parameters
$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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

Get Telemetry Data for Plug Session EV Only

Description

Gets the telemetry data that was collected during a given plug session.

path Parameters
plugSessionId
required
string

Unique ID of the plug session

query Parameters
limit
integer [ 0 .. 2147483647 ]

Limit for returned plug session telemetry data.

offset
integer [ 0 .. 2147483647 ]

Offset for pagination of returned plug session telemetry data.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 128 characters

Shared Secret

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "page": {
    }
}

Auth Tokens

Obtain Service Account Authorization Token

Description

Obtain a service account authorization token for an Application or an Organization.

Request

Parameter Type Required Description
clientId String Required The client Id.
clientSecret String Required The client password.

Response

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.
header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Request Body schema: application/json
clientId
required
string <= 256 characters

The client Id.

clientSecret
required
string <= 256 characters

The client secret.

Responses

Request samples

Content type
application/json
{
  • "clientId": "string",
  • "clientSecret": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

UDP Key Management

Create a new UDP key

Descriptions

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
keyType
required
string
Enum: "unicast" "broadcast"

The type of UDP key

Responses

Request samples

Content type
application/json
{
  • "keyType": "unicast"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get UDP keys

Descriptions

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.

query Parameters
$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

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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": [],
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Gets a UDP key

Description

Retrieve the UDP key with the given ID.

path Parameters
keyId
required
string

The unique ID of the UDP key.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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": []
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Deletes a UDP key

Description

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.

path Parameters
keyId
required
string

The unique ID of the UDP key.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Override Events

Create a Shared Device Override Event

Description

Create a new override event that shared devices (with 'schedule-override-events' access) can be registered for.

While the event is active, participating devices will be opened (for EMCBs) or will have charging disabled (for EV-EMCBs). Participating devices cannot be controlled by the primary organization unless the device owner opts out or the device is removed from the event's participants list.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
startTime
required
string <date-time>

The override event start time, in ISO 8601 date time string format.

endTime
required
string <date-time>

The override event end time, in ISO 8601 date time string format. It can be at most 30 days after the start time.

description
string

An optional override event description.

Responses

Request samples

Content type
application/json
{
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Shared Device Override Events

Description

Gets Shared Device Override Events that were either created by the logged in Organization, or affect one or more devices owned by the logged in Organization.

If neither createdByOrganizationId nor affectsDeviceIds are provided as filters, the override events will be filtered to events created by the logged in Organization.

If neither startTime nor endTime is provided as a filter, the override events will be filtered to events with an endTime greater than or equal to the current time.

The override events will be sorted ascending by the startTime and at most 500 events will be returned.

query Parameters
$filter
string
Enum: "createdByOrganizationId eq '{organizationId}'" "startTime ge 2012-05-29T00:00:00Z" "endTime le 2012-05-30T00:00:00Z" "affectsDeviceIds in ('{deviceId}', '{otherDeviceId}')"

Filter based on createdByOrganizationId, startTime, endTime, or device IDs which are participating in the event.

Filtering on both createdByOrganizationId and affectsDeviceIds in one request is not permitted.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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 deviceId1 = "f4628c73-0c62-491a-9454-a4f1b08e98ef"
var deviceId2 = "2f088162-5b66-4bee-ad60-fd47b0c3017b"

var request = {
    "method": "GET",
    "url": `https://api.em.eaton.com/api/v1/sharedDeviceOverrideEvents?$filter=affectsDeviceIds in ('${deviceId1}', '${deviceId2}') and startTime ge 2022-12-25T08:00:00Z`,
    "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": "523e5cba-8766-4d67-baed-6122822ca943",
    //         "startTime": "2022-12-26T00:00:00Z",
    //         "endTime": "2022-12-26T06:00:00Z",
    //         "createdAt": "2022-11-25T08:01:350Z",
    //         "createdByOrganizationId": "2ee3f9bd-f7c7-4869-a7a0-7a3de10ffafe",
    //         "status": "pending"
    //     }]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single Shared Device Override Event

Description

Retrieve a single shared device override event.

The override event creator is always authorized to view the event. Any organization with at least one device registered as a participant (regardless of status) also has read access to the event.

path Parameters
eventId
required
string

Shared device override event ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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 eventId = "523e5cba-8766-4d67-baed-6122822ca943"
var request = {
    "method": "GET",
    "url": `https://api.em.eaton.com/api/v1/sharedDeviceOverrideEvents/${eventId}`,
    "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": "523e5cba-8766-4d67-baed-6122822ca943",
    //         "startTime": "2022-11-26T00:00:00Z",
    //         "endTime": "2022-11-26T06:00:00Z",
    //         "createdAt": "2022-11-25T08:01:350Z",
    //         "createdByOrganizationId": "2ee3f9bd-f7c7-4869-a7a0-7a3de10ffafe",
    //         "status": "pending"
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Registers Shared Devices in an Override Event

Description

Register a list of devices as participants in the override event.

Any devices that are already registered with another override event during an overlapping time frame will not be registered for this event.

path Parameters
eventId
required
string

Unique ID of the shared device override event.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
deviceIds
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "deviceIds": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Override Event Participations

Description

Get a list shared device participations for a given shared device override event.

path Parameters
eventId
required
string

Unique ID of the shared device override event.

query Parameters
$filter
string
Value: "affectsDeviceIds in ('{deviceId}', '{otherDeviceId}')"

Filter based on the device IDs which are participating in the event.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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 eventId = "523e5cba-8766-4d67-baed-6122822ca943";

var deviceId1 = "83a8d689-2936-46ac-bd30-a3685bd4d9e2"
var deviceId2 = "62b96de5-69ad-412e-8b10-ac40aec707ee"

var request = {
    "method": "GET",
    "url": `https://api.em.eaton.com/api/v1/sharedDeviceOverrideEvents/${eventId}/sharedDeviceParticipations?$filter=affectsDeviceIds in ('${deviceId1}', '${deviceId2}') `,
    "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": [{
    //             "deviceId": "83a8d689-2936-46ac-bd30-a3685bd4d9e2",
    //             "sharedDeviceOverrideEventId": "523e5cba-8766-4d67-baed-6122822ca943",
    //             "status": "participating",
    //             "createdAt": "2022-11-25T08:01:350Z",
    //             "updatedAt": "2022-11-25T08:01:350Z"
    //         },
    //         {
    //             "deviceId": "62b96de5-69ad-412e-8b10-ac40aec707ee",
    //             "status": "optedOut",
    //             "createdAt": "2022-11-25T08:01:350Z",
    //             "updatedAt": "2022-11-27T01:05:120Z"
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Removes Shared Devices from an Override Event

Description

Remove a list of participating devices from the override event.

Only the override event creator can remove devices from an event.

Any devices which have opted out or have already been removed will not be affected.

path Parameters
eventId
required
string

Unique ID of the shared device override event.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
deviceIds
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "deviceIds": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Opts Out Shared Devices from an Override Event

Description

Opt out a list of participating devices from the override event.

Only the device owner can opt out devices from an override event.

Any devices which have already been opted out or removed will not be affected.

path Parameters
eventId
required
string

Unique ID of the shared device override event.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
deviceIds
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "deviceIds": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Cancel a Shared Device Override Event

Description

Cancel a shared device override event. All device participations must be opted out or removed before the override event can be cancelled.

Only the override event creator can cancel the event.

path Parameters
eventId
required
string

Unique ID of the shared device override event.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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 eventId = "523e5cba-8766-4d67-baed-6122822ca943";
var request = {
    "method": "POST",
    "url": `https://api.em.eaton.com/api/v1/sharedDeviceOverrideEvents/${eventId}/cancellation`,
    "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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Register Device Override Event Webhook

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Request Body schema: application/json
uri
required
string <= 256 characters

The webhook URI.

additionalHttpHeaders
object

Generic object containing any webhook headers.

Responses

Request samples

Content type
application/json
{
  • "uri": "string",
  • "additionalHttpHeaders": { }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Device Override Event Webhooks

Get a list of registered override event webhooks.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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"
    //             }
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single Device Override Event Webhook

Gets a device override event webhook.

path Parameters
id
required
string

Unique ID of the override event webhook.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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"
    //         }
    //    }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete Device Override Event Webhook

Deletes a registered device override event webhook from an application.

path Parameters
id
required
string

Unique ID of the override event webhook.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Share Device Codes

Create a Share Device Code

Description

Create a share device code.

Another organization can claim this code at a later date in order to gain limited access to the device associated with this share code.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
deviceId
required
string

The Device ID

accessTypes
required
Array of strings (Share Code Access Type)
Items Enum: "stream-data" "schedule-override-events"
expirationDate
string <date-time>

The expiration of the share device code, in ISO 8601 date time string format. An Organization cannot claim the share code past this date; however, an Organization that has already claimed the code will retain their access to the device. If an expiration date is not specified, then the code will never expire.

Responses

Request samples

Content type
application/json
{
  • "deviceId": "string",
  • "accessTypes": [
    ],
  • "expirationDate": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get A List of Share Device Codes

Description

Get a list of share device codes.

Filters

The following filter options are supported:

  • 'deviceId' filter option returns codes that are attached to the given device ID
  • 'action' filter option returns codes that were either created or claimed by the logged in Organizaiton. Valid types are either 'createdByCurrentOrganization' or 'claimedByCurrentOrganization'
  • 'status' filter option returns codes with the given status. Valid statuses are 'available', 'expired', 'claimed', 'revoked', or 'relinquished'.
  • 'accessType' filter option returns codes that grant the claiming organization the given access type. Valid accessTypes are 'stream-data' or 'schedule-override-events'.
query Parameters
$filter
string
Enum: "deviceId eq 'deviceId'" "action eq 'action'" "status eq 'status'" "accessType eq 'accessType'"

Filter based on deviceId, action, status, or accessType.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.eaton.com/api/v1/shareDeviceCodes?$filter=action eq 'createdByCurrentOrganization' and status eq 'claimed'`,
    "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": "k1spte30p8cj",
    //         "accessTypes": ["stream-data"],
    //         "createdByOrganizationId": "265cdaed-c4ee-47f1-a66c-0cdf9aab568e",
    //         "createdAt": "2022-10-26T00:00:00Z",
    //         "deviceId": "44e94d83-0455-4255-94b9-201fe59f7328",
    //         "status": "claimed",
    //         "claimedAt": "2022-10-28T00:00:00Z",
    //         "claimedByOrganizationId": "49f35106-72be-44ef-9a73-41d626e536a5",
    //     }]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Share Device Code Details

Description

Get the details of a share device code. Only the code's creator and the organization who claimed the code can view the details.

path Parameters
code
required
string

Share device code

header Parameters
Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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 code = "af4tsf"

var request = {
    "method": "GET",
    "url": `https://api.em.eaton.com/api/v1/shareDeviceCodes/${code}`,
    "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": {
    //          "code": "af4tsf",
    //          "createdByOrganizationId": "ed381a3d-a87f-461e-b5b5-1c3120fe3f10",
    //          "createdAt": "2022-11-16T16:00:30Z"
    //          "status": "Available"
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Claim a Share Device Code

Description

Claim a share device code.

path Parameters
code
required
string

Share device code

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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 = "fpz6qv8u6lt2";

var request = {
    "method": "POST",
    "url": `https://api.em.eaton.com/api/v1/shareDeviceCodes/{code}/claim`,
    "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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Revoke a Share Device Code

Description

Revoke a share device code. This will prevent any Organization from claiming the code going forward.

If the code has already been claimed, shared device permissions will be revoked and any configured shared device streams or override events will be cleared.

path Parameters
code
required
string

Share device code

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Relinquish a Share Device Code

Description

Relinquish a claimed share device code.

Shared device permissions will be relinquished and any configured shared device streams or override events will be cleared.

path Parameters
code
required
string

Share device code

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get Share Code Device Summary

Description

Retrieve details about the device that a share device code grants access to.

If a code has already been claimed, then only the creator or claimer of the code may retrieve the details.

path Parameters
code
required
string

Share device code

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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 = "42kkgctz873t";

var request = {
    "method": "GET",
    "url": `https://api.em.eaton.com/api/v1/shareDeviceCodes/${code}/deviceSummary`,
    "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": "42kkgctz873t",
    //         "accessTypes": ["schedule-override-events"],
    //         "deviceId": "22280b88-0355-4d53-8b9e-1c4f6eb5ba87",
    //         "deviceSerialNumber": "30000e1c243e10a4",
    //         "address": {
    //             "city": "city",
    //             "state": "state",
    //             "postalCode": "postalCode",
    //             "street1": "street1",
    //             "street2": "street2"
    //         },
    //         "contactInfo": {
    //             "name": "name",
    //             "phone": "phone",
    //             "email": "email"
    //         }
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Register Share Device Code Webhook

Registers a share device code webhook that will be called when shared device access changes for organizations within the application that registered the webhook:

This webhook is called when a share device code that was created by any organization in the application hierarchy has been claimed or relinquished by another organization.

This webhook is also called when a share device code that was claimed by an organization in the application has been revoked by the organization that created the code.

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 Share Device Code Webhook request for details on how that request is structured.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Request Body schema: application/json
uri
required
string <= 256 characters

The webhook URI.

additionalHttpHeaders
object

Generic object containing any webhook headers.

Responses

Request samples

Content type
application/json
{
  • "uri": "string",
  • "additionalHttpHeaders": { }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Share Device Code Webhooks

Get a list of registered share device code webhooks.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.eaton.com/api/v1/shareDeviceCodeWebhooks",
    "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": "bac25ee8-8086-4c5d-bd4b-179ed1b9b183",
    //             "uri": "www.partner-application.com/share-device-code-webhook",
    //             "additionalHttpHeaders": {
    //                 "Authorization": "A-Shared-Secret",
    //                 "AnotherHeader": "AnotherValue"
    //             }
    //         },
    //         {
    //             "id": "f9149319-d29b-4d6e-95d1-f368cf2c207b",
    //             "uri": "www.partner-application.com/other-share-device-code-webhook",
    //             "additionalHttpHeaders": {
    //                 "Authorization": "A-Shared-Secret"
    //             }
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single Share Device Code Webhook

Gets a share device code webhook.

path Parameters
id
required
string

Unique ID of the share device code webhook.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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 = "1884b653-d781-4737-b0ae-954884a008d0";

var request = {
    "method": "GET",
    "url": `https://api.em.eaton.com/api/v1/shareDeviceCodeWebhooks/${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": "1884b653-d781-4737-b0ae-954884a008d0",
    //         "uri": "www.partner-application.com/share-device-code-webhook",
    //         "additionalHttpHeaders": {
    //             "Authorization": "A-Shared-Secret",
    //             "AnotherHeader": "AnotherValue"
    //         }
    //    }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete Share Device Code Webhook

Deletes a registered share device code webhook from an application.

path Parameters
id
required
string

Unique ID of the share device code webhook.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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 = "1884b653-d781-4737-b0ae-954884a008d0";

var request = {
    "method": "DELETE",
    "url": `https://api.em.eaton.com/api/v1/shareDeviceCodeWebooks/${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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Shared Devices

Get Shared Device

Description

Retrieve details about a shared device that has been claimed by the logged in Organization.

path Parameters
id
required
string

Shared Device ID

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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 id = "22280b88-0355-4d53-8b9e-1c4f6eb5ba87";

var request = {
    "method": "GET",
    "url": `https://api.em.eaton.com/api/v1/sharedDevices/${id}`,
    "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": "22280b88-0355-4d53-8b9e-1c4f6eb5ba87",
    //         "hardwareType": "emcb",
    //         "sku": "BREM1015",
    //         "serialNumber": "30000e1c243e10a4",
    //         "shareCode": "42kkgctz873t",
    //         "shareCodeClaimedAt": "2022-11-16T16:00:30Z"
    //         "accessTypes": ["schedule-override-events"],
    //         "address": {
    //             "city": "city",
    //             "state": "state",
    //             "postalCode": "postalCode",
    //             "street1": "street1",
    //             "street2": "street2"
    //         },
    //         "contactInfo": {
    //             "name": "name",
    //             "phone": "phone",
    //             "email": "email"
    //         }
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Shared Devices

Description

Retrieve details about all shared devices that have been claimed by the logged in Organization.

Filtering on 'accessType' returns a list of shared devices where the Organization has the provided access type for the device.

query Parameters
$filter
string
Value: "accessType eq '{accessType}'"

Filter based on accessType

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.eaton.com/api/v1/sharedDevices`,
    "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": "22280b88-0355-4d53-8b9e-1c4f6eb5ba87",
    //             "hardwareType": "emcb",
    //             "sku": "BREM1015",
    //             "serialNumber": "30000e1c243e10a4",
    //             "shareCode": "42kkgctz873t",
    //             "shareCodeClaimedAt": "2022-11-16T16:00:30Z"
    //             "accessTypes": ["schedule-override-events"],
    //             "address": {
    //                 "city": "city",
    //                 "state": "state",
    //                 "postalCode": "postalCode",
    //                 "street1": "street1",
    //                 "street2": "street2"
    //             },
    //             "contactInfo": {
    //                 "name": "name",
    //                 "phone": "phone",
    //                 "email": "email"
    //             }
    //         },
    //         {
    //             "id": "2f088162-5b66-4bee-ad60-fd47b0c3017b",
    //             "hardwareType": "ev-emcb",
    //             "sku": "BREM1015",
    //             "serialNumber": "30000e1c243e10a4",
    //             "chargerStationId": "etn-8675"
    //             "shareCode": "42kkgctz873t",
    //             "shareCodeClaimedAt": "2022-11-16T16:00:30Z"
    //             "accessTypes": ["schedule-override-events"],
    //             "address": {
    //                 "city": "city",
    //                 "state": "state",
    //                 "postalCode": "postalCode",
    //                 "street1": "street1",
    //                 "street2": "street2"
    //             },
    //             "contactInfo": {
    //                 "name": "name",
    //                 "phone": "phone",
    //                 "email": "email"
    //             }
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Shared Device Streams

Add a Shared Device to an existing Stream

Description

Add a share device to an existing device stream.

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 device streams that the primary device owner created), a 400 error result will be returned.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Request Body schema: application/json
deviceId
required
string

The id of the device.

streamId
required
string

The id of the stream.

Responses

Request samples

Content type
application/json
{
  • "deviceId": "string",
  • "streamId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Shared Device Streams

Description

Get share device streams.

query Parameters
$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

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.eaton.com/api/v1/sharedDeviceStreams?$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": "e98bfed3-0765-45a2-9fd0-0a6c883f86a0",
    //         "streamId": "1531628d-3a26-404b-a093-85f654765d07",
    //         "deviceId": "d51f61c3-a4a6-43d2-b3f1-252c303b84b9",
    //     }]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single Shared Device Stream

Description

Retrieve a single shared device stream.

path Parameters
id
required
string

The unique shared device stream ID.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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 id = "d01e94b7-6c29-469a-89e6-6be50fd0bc39"

var request = {
    "method": "GET",
    "url": `https://api.em.eaton.com/api/v1/sharedDeviceStream/${id}`,
    "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": "d01e94b7-6c29-469a-89e6-6be50fd0bc39",
    //         "streamId": "1531628d-3a26-404b-a093-85f654765d07",
    //         "deviceId": "d51f61c3-a4a6-43d2-b3f1-252c303b84b9",
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete Single Shared Device Stream

Description

Deletes a single shared device stream.

path Parameters
id
required
string

The unique shared device stream ID.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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 sharedDeviceStreamId = "1531628d-3a26-404b-a093-85f654765d07";

var request = {
    "method": "DELETE",
    "url": `https://api.em.eaton.com/api/v1/sharedDeviceStreams/${sharedDeviceStreamId}`,
    "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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get Share Device Stream Status

Description

Reads share device stream health status.

path Parameters
id
required
string

Unique ID of the shared device stream.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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 appropriate auth token.

var id = "d01e94b7-6c29-469a-89e6-6be50fd0bc39"

var request = {
    "method": "GET",
    "url": `https://api.em.eaton.com/api/v1/sharedDeviceStreams/${id}/status`,
    "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": {
    //          "dateTime": "2022-11-16T16:00:30Z",
    //          "message": "All is well",
    //          "streamStatusCode": 200
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Organizations

Create an Organization

Description

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Request Body schema: application/json
name
required
string

The name of the organization.

description
required
string

The description of the organization.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Organizations

Description

Retrieve multiple organizations.

To include the permissions granted to the authenticated account for each organization, set the includePermissions query parameter to true.

query Parameters
includePermissions
string
Default: "false"
Enum: "true" "false"

Include the "permissions" field on each organization in the response. Default is false.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single Organization

Description

Retrieve a single organization.

path Parameters
organizationId
required
string

Unique ID of the organization.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Organization Users

Description

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').

path Parameters
organizationId
required
string

Unique ID of the organization.

query Parameters
$filter
string
Value: "role eq 'Installer'"

Filters users by role.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Token in Bearer format

Responses

Request samples

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.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"
    //             ]
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Rotate Organization Service Account Secret

Description

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.

path Parameters
serviceAccountId
required
string

Unique ID of the service account.

secretName
required
string

Name of the secret to rotate. Valid secretNames are 'secret1' or 'secret2'.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Locations

Create Location

Description

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
One of
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.

email
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

Responses

Request samples

Content type
application/json
No sample

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Locations

Description

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.

query Parameters
$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 false.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Token in Bearer format

Responses

Request samples

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.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"
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single Location

Description

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.

path Parameters
locationId
required
string

Unique ID of the location.

query Parameters
includePermissions
string
Default: "false"
Enum: "true" "false"

Include the "permissions" field in the response. Default is false.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Token in Bearer format

Responses

Request samples

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.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"
    //             }
    //         }
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update Location

Description

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.

path Parameters
locationId
required
string

Unique ID of the location.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
parentLocationId
string

The id of the location's parent.

name
string
description
string
contact
string

The name of the contact for the location.

email
string

The email address for the location contact.

phone
string

The phone number for the location contact.

object
object

Responses

Request samples

Content type
application/json
{
  • "parentLocationId": "string",
  • "name": "Building 5",
  • "description": "string",
  • "contact": "string",
  • "email": "string",
  • "phone": "string",
  • "address": {
    },
  • "customTypeInfo": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Remove Location

Description

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.

path Parameters
locationId
required
string

Unique ID of the location.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Users

Get Assignable Roles

Description

Retrieves assignable roles.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Token in Bearer format

Responses

Request samples

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.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"
    //     }]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Assign Role to User

Description

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.

query Parameters
skipNotificationEmail
boolean

Choose to skip sending an email to the user when their role is changed.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
One of
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.

Responses

Request samples

Content type
application/json
{
  • "organizationId": "string",
  • "roleId": "string",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get List of Roles Assigned

Description

Gets all assigned user roles and their status for an organization.

query Parameters
$filter
string
Value: "status eq '{status}'"

Filter based on role status

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    //     }]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Remove Role from User

Description

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
One of
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.

Responses

Request samples

Content type
application/json
{
  • "organizationId": "string",
  • "roleId": "string",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Create a user invitation code

Description

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Request Body schema: application/json
One of
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)

Responses

Request samples

Content type
application/json
{
  • "organizationId": "string",
  • "roleId": "string",
  • "restrictions": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get list of invite codes

Description

Get a list of invite codes.

Filters

The following filter options are supported:

  • 'scope' filter option returns codes with either organization-wide access or access only within a given location hierarchy. Valid scopes are either 'organization' or 'location'
  • 'locationId' filter option returns codes associated with a particular location (may not be included if filtering by organization scoped codes)
  • 'isActive' filter options returns either active or inactive invite codes. An invite code is considered inactive if it is past the 'expirationDate' or the invite code's 'userLimit' has been exceeded

Some examples of filtering include:

  • /inviteCodes?$filter=scope eq 'organization'
  • /inviteCodes?$filter=locationId eq '1e6940cf-9419-4c85-bbfd-12610f36739c' and isActive eq true
query Parameters
$filter
string
Enum: "scope eq '{scope}'" "locationId eq '{locationId}'" "isActive eq {isActive}"

Filter based on scope, locationId, or isActive status.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    //     }]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get invite code

Get invite code details

path Parameters
code
required
string

The invite code

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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"
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Deactivate Invite Code

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.

path Parameters
code
required
string

Unique invite code.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Organization Service Account Token in Bearer format

Responses

Request samples

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.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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Register User Permission Webhook

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Request Body schema: application/json
uri
required
string <= 256 characters

The webhook URI.

additionalHttpHeaders
object

Generic object containing any webhook headers.

Responses

Request samples

Content type
application/json
{
  • "uri": "string",
  • "additionalHttpHeaders": { }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get User Permission Webhooks

Get a list of registered user permission webhooks.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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"
    //             }
    //         }
    //     ]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single User Permission Webhook

Gets a user permission webhook.

path Parameters
webhookId
required
string

Unique ID of the user permission webhook.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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"
    //         }
    //    }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete a User Permissions Webhook

Delete a registered user permissions webhook from an application.

path Parameters
webhookId
required
string

Unique ID of the user permission webhook.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Resource Quotas

Get Resource Quotas for an Application

Description

Get all the resource quotas for the Application.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Central System Management

Create OCPP Central System EV Only

Description

Used to create a new OCPP Central System. Does not actually register the OCPP Central System to a particular device.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Request Body schema: application/json
websocketBaseUrl
required
string

The websocket endpoint of the OCPP Central System.

Responses

Request samples

Content type
application/json
{
  • "websocketBaseUrl": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get OCPP Central Systems

Description

Get all OCPP Central Systems created for the Application.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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"
    //     }]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single OCPP Central System EV Only

Description

Get a single OCPP Central System by Id.

path Parameters
ocppCentralSystemId
required
string

Unique ID of the OCPP central system.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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"
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete OCPP Central System

Description

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.

path Parameters
ocppCentralSystemId
required
string

Unique ID of the OCPP central system.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Charge Point Management

Create OCPP Charge Point EV Only

Description

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.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "ocppCentralSystemId": "string",
  • "deviceId": "string",
  • "password": "string",
  • "chargePointIdentifier": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get OCPP Charge Points

Description

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.

query Parameters
$filter
string
Enum: "ocppCentralSystemId eq '{ocppCentralSystemId}'" "deviceId eq '{deviceId}'"

Filter based on ocppCentralSystemId or deviceId or both

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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"
    //     }]
    // }
})

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Single OCPP Charge Point EV Only

Description

Get a single OCPP Charge Point by Id.

path Parameters
ocppChargePointId
required
string

Unique ID of the charge point.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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"
    //     }
    // }
})

Response samples

Content type
application/json
{
  • "data": {
    }
}

Unregister OCPP Charge Point

Description

Unregister the charge point from the device.

path Parameters
ocppChargePointId
required
string

Unique ID of the charge point.

header Parameters
Em-Api-Subscription-Key
required
string <= 128 characters

Smart Breaker API Key

Authorization
required
string <= 2000 characters

Application Service Account Token in Bearer format

Responses

Request samples

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.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
})

Response samples

Content type
application/json
{
  • "error": {
    }
}

Webhooks

Device Onboarding Webhook Webhook

Description

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.

Request Body schema: application/json
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 hardwareType of ev-emcb.

object

Details including type, model and manufacturer's name.

Responses

Request samples

Content type
application/json
{
  • "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": {
    }
}

Validate Webhook Stream Webhook

Description

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:

  • For region, the value will be global
  • For service, the value will be eatonem-agent-stream
  • The signed headers in the canonical request will always include:
    • host (the service base url, without the protocol string)

To learn more about Streams, refer to the Understanding Streams topic in the Developer Portal.

header Parameters
Authorization
required
string

Refer to this documentation and the request description for EM API implementation specifics.

X-Amz-Date
required
string
Host
required
string

The domain from the baseUrl provided in the webhook stream setup request.

Responses

Publish Device Data to Webhook Webhook

Description

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.

Standard Stream Data Format

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:

  • For region, the value will be global
  • For service, the value will be eatonem-agent-stream
  • The signed headers in the canonical request will always include:
    • host (the service base url, without the protocol string)
  • The signed headers in the canonical request may include:
    • content-type if the request body is not empty
      • If included, the value will always be application/x-amz-json-1.0

To learn more about Streams, refer to the Understanding Streams topic in the Developer Portal.

header Parameters
Authorization
required
string

Refer to this documentation and the request description for EM API implementation specifics.

X-Amz-Date
required
string
Host
required
string

The domain from the baseUrl provided in the webhook stream setup request.

Content-Length
required
string

Request body content length.

Content-Type
required
string
Value: "application/x-amz-json-1.0"
Request Body schema: application/json
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 accelerometer resource.

object

Collection of data that describes the breaker resource.

object

Collection of data that describes the device resource.

object

Collection of data that describes the evse resource.

object

Collection of data that describes the meter resource.

object

Collection of data that describes the thermometer resource.

object

Collection of data that describes the telemetry resource.

object

Collection of data that describes the bargraph resource.

Responses

Request samples

Content type
application/json
{
  • "deviceId": "string",
  • "serialNumber": "string",
  • "schemaVersion": "4.2.0.beta",
  • "transactionId": "string",
  • "ts": 0,
  • "accelerometer": {
    },
  • "breaker": {
    },
  • "device": {
    },
  • "evse": {
    },
  • "meter": {
    },
  • "thermometer": {
    },
  • "telemetry": {
    },
  • "bargraph": {
    }
}

User Permission Webhook Webhook

Description

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:

  • A user is invited to an application hierarchy by email through the POST /userRoles API.
    • If the user is already registered in the EM API system, the permissionChangeType is 'assigned'.
    • If the user has not completed account registration yet, the permissionChangeType is 'invited'.
  • A pending user role is activated when a user finishes the user registration process. The permissionChangeType is 'assigned'.
  • A user role is revoked through the DELETE /userRoles API.
    • If the user role was active, the permissionChangeType is 'revoked'
    • If the user role was pending, the permissionChangeType is 'cancelled'.
  • A user gains access to the application hierarchy by accepting an invite code. The permissionChangeType is 'assigned'.
Request Body schema: application/json
One of
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:

  • invited: a 'pending' user role is created through the POST /userRoles API for a user that has not yet registered an account
  • assigned: user permissions are actually applied in one of the following scenarios:
    • Pending user roles are applied when a user finished registering their account
    • Permissions are assigned by email to an existing user through the POST /userRoles API
    • Or, an existing user accepts an invite code using the EM Install app.
  • cancelled: a 'pending' user role is deleted through the DELETE /userRoles API before the user has created their account
  • revoked: a user loses active permissions when an active user role is deleted through the DELETE /userRoles API

Responses

Request samples

Content type
application/json
{
  • "organizationId": "string",
  • "email": "string",
  • "timestamp": "string",
  • "roleId": "string",
  • "inviteType": "email",
  • "permissionChangeType": "assigned"
}

Device Override Event Webhook Webhook

Description

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:

  • An organization adds a device to an override event through the POST /sharedDeviceOverrideEvents/{id}/sharedDeviceParticipations API. The device's participation status is 'participating'.
  • An organization removes a device from an override event through the POST /sharedDeviceOverrideEvents/{id}/sharedDeviceRemovals API. The device's participation status is 'removed'.
  • The device owner opts out a device from an override event through the POST /sharedDeviceOverrideEvents/{id}/sharedDeviceOptouts API. The device's participation status is 'optedOut'.
Request Body schema: application/json
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:

  • participating: an event creator organization added the device as a participant in a shared device override event through the POST /sharedDeviceOverrideEvents/{id}/sharedDeviceParticipations API
  • removed: an event creator organization removed the device as a participant from a shared device override event through the POST /sharedDeviceOverrideEvents/{id}/sharedDeviceRemovals API, or the device was decommissioned/recommissioned into a different Organization
  • optedOut: the device owner opted out the device from participating in a shared device override event through the POST /sharedDeviceOverrideEvents/{id}/sharedDeviceOptouts API

Responses

Request samples

Content type
application/json
{
  • "deviceId": "string",
  • "deviceOverrideEventId": "string",
  • "deviceOwnerOrganizationId": "string",
  • "eventCreatorOrganizationId": "string",
  • "eventCreatorOrganizationName": "string",
  • "updatedAt": "string",
  • "status": "participating"
}

Share Device Code Webhook Webhook

Description

NOTE: This is a POST request.

Provides information about a change to the share device code's status.

This request is initiated by the EM System in the following scenarios:

  • An organization claims the share device code through the POST /shareDeviceCodes/{id}/claim API. The code's status is 'claimed'.
  • The organization that created the share device code revokes it through the POST /shareDeviceCodes/{id}/revocation API. The code's status is 'revoked'.
  • The organization that claimed the share device code relinquishes its access through the POST /shareDeviceCodes/{id}/relinquishment API. The code's status is 'relinquished'.
Request Body schema: application/json
deviceId
required
string

The device ID to which the share device code grants access.

code
required
string

The share device code.

deviceOwnerOrganizationId
required
string

The ID of the organization which owns the device and created the share device code.

deviceOwnerOrganizationName
required
string

The name of the organization which owns the device and created the share device code.

claimingOrganizationId
required
string

The ID of the organization that claimed the share device code.

claimingOrganizationName
required
string

The name of the organization that claimed the share device code.

updatedAt
required
string

The time that the share device code's status changed, in ISO 8601 date time string format.

status
required
string
Enum: "claimed" "revoked" "relinquished"

Describes how the share device code's status has changed:

  • claimed: an organization claimed the code and was granted shared access to the device through the POST /shareDeviceCodes/{id}/claim API
  • revoked: the organization which created the code has revoked shared access to the device through the POST /shareDeviceCodes/{id}/revocation API
  • relinquished: the organization which claimed the code has relinquished its shared access to the device through the POST /shareDeviceCodes/{id}/relinquishment API

Responses

Request samples

Content type
application/json
{
  • "deviceId": "string",
  • "code": "string",
  • "deviceOwnerOrganizationId": "string",
  • "deviceOwnerOrganizationName": "string",
  • "claimingOrganizationId": "string",
  • "claimingOrganizationName": "string",
  • "updatedAt": "string",
  • "status": "claimed"
}