DEXMA API - Documentation

Follow

This article includes the following sections:

 

API v3 | Documentation

In this section, the following topics will be covered:

  1. Introduction
  2. Using the API v3
  3. Creating an Application
  4. Calls examples

Introduction

An app is defined by a set of views that can be embedded into DEXMA using an Iframe. Apps are configured in DEXMA Developer Portal (access should be requested) inside "Account Management" in DEXMA. For each App, and idclient and a secret are provided.

 

Using the API v3


To start using the DEXMA API, click here: DEXMA API v3
 

Creating an Application

To create an Application just log in your developer or superadmin account into DEXMA and go to "Market Apps". There is a list of all your applications. You can create, modify and publish applications.

To create an application just click on "New Market App" and fill the form:
dexmaapidocumentastion-1.png
 
Name: A name for your application.
Description: A description of your application.
Image: You can upload a 200px x 200px image that will be shown in the Market.
Price: Select a price. 0 for free.
Contact: Your email address.
Software by: The name of your company.
Visibility: Public apps will be available for all DEXMA customers. Private apps will be available only for your customers.
Terms of service: A link to your terms of service.
Install URL: The url that will perform the install of the application (see developers.dexcell.com)
Views: You can define as many views as you want. For every view, an icon (optional), a name and a url (the url that will be embedded inside the iframe) need to be defined. You need also to define where the view will appear: Location Dashboards, Zone Dashboards, Analysis, Configuration.
Permissions: The app needs to define each kind of information wants to access from the customer account.

 

Call examples

Obtain a list of all my locations

url: https://api.dexcell.com/v3/locations

ae0297a62d7dc329423a6102fa876126ce49b6d75c7a60890ec31b9dd66b8df0.png

 

Obtain the specific information of one account

url: https://api.dexcell.com/v3/locations/XXX (where XXX is one of the IDs obtained in the previous call)

51df1b07e83cb95d52eca1d3186ed9c5c6c38a4503d7c85807cb75afa5a86023.png


 

Obtain electrical consumption data

url: http://api.dexcell.com/v3/readings?device_id=XXXXX&operation=DELTA&parameter_key=EACTIVE&resolution=D&from=2015-05-08T00:00:00&to=2015-05-09T23:59:59​

4c24fdc2426fd0e89c57a414e958a855549b1e9a8a5f64e065a295051de946e2.png


How do I create the call?

http://api.dexcell.com/v3/readings + “?” + all the parameters joint by “&”
- device_id: 3473 (id of the device)
- Operation: DELTA (delta readings) 
- Parameter_key: EACTIVE (key of the Active Energy parameter)
- Resolution: D (daily). Others: FM, TM, QH, HH, H, D, M
- From: 2016-05-08T00:00:00  (from date with the format YYYY-MM-DDT00:00:00)
- To: 2016-05-10T23:59:59 (to date with the format YYYY-MM-DDT00:00:00)
 

Obtain electricity cost for a specific device

url: http://api.dexcell.com/v3/cost/electrical/consumption?device_id=XXXX&from=2016-04-01T00:00:00&to=2015-12-31T23:59:59&resolution=M

2a97fc1c3b18e3e296146719ddda56b9c1993006faf86d806775f0303a2cbc07.png

How I create the call?

http://api.dexcell.com/v3/cost/electrical/consumption + “?” + all the parameters joint by “&”
- device_id: 3473 (id of the device)
- Resolution: M (monthly). Others: FM, TM, QH, HH, H, D, M
- From: 2016-05-08T00:00:00  (from date with the format YYYY-MM-DDT00:00:00)
- To: 2016-05-10T23:59:59 (to date with the format YYYY-MM-DDT00:00:00)

 

Data insertion API

The EM platform offers an API to insert data from external applications. This API is based in HTTPS and JSON.

Check this article to learn how to insert data into your account through the HTTPS/JSON API.

 

Was this article helpful?