NAV
Command Line Ruby Python PHP Perl Java NodeJS Javascript

Introduction

Welcome to the EKM METERING API!

We at EKM see easy access to your data, and the scalable systems behind the EKM Push, as crucial to moving our products into the future. To that end, we do what is unheard of in our industry, we give you your data for FREE.

The EKM API is organized around Representational State Transfer, or REST. You can use our Application Programming Interface, or API, to access EKM API endpoints, which can get you information on various EKM Push meter/ioStack data and utilize it in your own application, database, billing system, or building automation system.

We have language bindings in Shell (cURL), Ruby, Python, PHP, Perl, Java, Javascript and Nodejs! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients, and we support cross-origin resource sharing to allow you to interact securely with our API from a client-side web application (though you should remember that you should never expose your secret EKM Push API key in any public website’s client-side code). JSON will be returned in all responses from the API, including errors (though if you’re using API bindings, we will convert the response to the appropriate language-specific object).

Authentication

To authorize, make sure to use your personal EKM Push account key.

The examples in this API documentation use the demo key of MTAxMDoyMDIw. Please make sure you remove this key and place your personal key in the https address if you are trying to access the meters in your account.

With shell, you can just pass the correct address with each request
curl -s "URL Here"
Authorization: "EKM Push Key"
# Ruby Version: 3.1.2

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call

def call_api(api_path)
  uri = URI.parse("URL Here#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include for example https://summary.ekmpush.com
api_object = call_api('URI Here')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''
    Make http request
    '''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("URL Here")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.0.17 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject=callApi('URL Here');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi ($apiRequest='') {

        $json=@file_get_contents($apiRequest);
        $jsonObject=json_decode($json);
        return ($jsonObject);

}
?>    
#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api('URL Here');

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONObject callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONObject(response.toString());
    }

    public static void main(String[] args) throws Exception {
        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONObject apiObject = EKM.callApi("URL Here");

        /*
         You can access any part of the apiObject using code like this:
         JSONArray  readData = apiObject.getJSONObject("readmeter").getJSONArray("ReadSet").
         getJSONObject(0).getJSONArray("ReadData");
        */

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">

// The example function is called from the 
// body tag when the page loads
function example(){

// Call the callApi function to create a usable
// object named apiObject from the API request URL.
// Put the API request URL in the call
callApi('URL Here',function(apiObject){

       // This just displays the object in the result div
       // you can use what ever code you would like to work 
       // with the object here
       document.getElementById("result").innerHTML = "<pre>"+JSON.stringify(apiObject, null, 4)+"</pre>";
       });

};

// This code accesses the apiRequest URL and converts
// the contents to a usable JSON object named apiObject
function callApi(apiRequest,callback) {
    var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
      if (xhttp.readyState == 4 && xhttp.status == 200) {
        var jsonObject = JSON.parse(xhttp.responseText);
        callback(jsonObject);
      }
    };
    xhttp.open("GET", apiRequest, true);
    xhttp.send();
}
</script>

</head>
  <body onload="example()">
    <div id="result"/>
  </body>
</html>
/*
* Requirements
* NodeJS: v16.14.2
* Axios:  0.27.2
*/

// Load modules
const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'URL Here',
  timeout: 1000 * 15,
})

// This code accesses the apiRequest query and
// logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('URI Here');
    const apiResData = res.data;

    console.log(JSON.stringify(apiResData, null, 2));
  } catch (error) {
    console.error(error.message);
  }
})();

Make sure to replace the sample key: MTAxMDoyMDIw, with your API key in the https address.

EKM uses API keys to allow access to the API. You authenticate to the EKM API by providing one of your unique API keys in each request. Each Push account holder is provided with an EKM Push User Key, which provides access to all meters in their account. This key carries lots of privileges so we encourage you to keep it secret. In addition to this master key, additional keys are also provided to give access to each meter/ioStack individually, and keys can be created to provide access to sub groups of meters/ioStacks upon request. These secondary keys can be used to share single meters/ioStacks, or a subset of meters/ioStacks, without sharing access to all meters/ioStacks in an account. For example, if you are a landlord with multiple rentals and meters/ioStacks, you could share specific meter/ioStack keys with each of your tenants, so that they could have access to only the data that pertains to their usage.

Authentication to the API occurs via HTTP Basic Auth. Provide your API key as the basic authorized username. You do not need to provide a password. You must authenticate for all requests.

The EKM Push API expects the API key to be included in all requests to the server. The key is included in the URL in the following way:

Authorization: key=MTAxMDoyMDIw

Realtime API

Click here to go to Realtime Documentation

If you are developing your own app, cloud-to-cloud solution, billing system, or other SAS solution, our Real-Time API allows you to easily access your EKM Push data in any format that you need. Below you will find descriptions regarding how to access the data, and about the filters you can apply so the data comes to you in a format that is easily digested and inserted into your software solution.

The real-time API provides the 1,000 latest meter readings for each of your meters/IOStack devices. If your device is being read once per minute, the data will be made available once per minute, per device. Whether you have one device or 10,000 devices, this is the easiest and most scalable way to access your data.

The EKM Dash, EKM Widget, encompass.io, wattvision.com, pvoutput.org, the other solutions in our Push App Store, as well as other customers that have their own custom solutions, all use this API to access their data. We use the same API as you and do not give ourselves any special permissions, we see what you see, which forces us to make the API as great as possible for everyone. We have even given you code examples that can be copy and pasted into your own software language to make the data access that much easier.

Use the API definition, metered values definition, code snippet suggestion, and guide to get you on your way to developing your next killer app. If you create something great, let us know; we’re open to adding all useful apps into the Push App Store.

We also have a Realtime API Request Builder Tool found here:

Realtime API Builder

Account API

Click here to go to Account API Documentation

This API provides information for accounts and devices owned by the account.

Get information for the specified target, which can be account, gateway, meter or ioStack.

You could make API request with the EKM Push Key that is your own Authorization Key that you received for your Push Account, or instead the EKM Push Key you could use Gateway Key for more restricted access. Be aware that if you use the Gateway Key, you will only receive information regards to that gateway.

Gateway Settings API

Click here to go to Gateway Settings API Documentation

This API is used to send commands and settings to devices connected to a Push3 gateway as well as the gateway device itself.

Trigger API

Click here to go to Trigger API Documentation

A REST API to lookup/create/update/delete triggers.

EKM Push3 gateway triggers are one of the most powerful tools that EKM has to offer. You can automate how and when the EKM Push system will react to metered values. You can have the Push gateway send you an email or control a relay to turn on/off a switch or close a valve based on the metered data for example. Push3 gateways have the ability trigger specific actions based on conditions that you set up. Triggers live on the Push3 gateways so they will continue to function even without an internet connection. Triggers can control the relays on the v.4 Omnimeters, in order to turn something on or off, or they can email you notifications of the trigger. Please note: v.3 Omnimeters do not have controllable relays, so the relay triggers will not work, but the email triggers will.

Summary API

Click here to go to Summary Documentation

Our Summary API takes every Real-Time read, over 15 minute time periods, and summarizes them into single 15 minute summaries. We store this data forever to provide a long term historical dataset for each meter. Our system can then combine these summaries together to summarize hours, days, weeks, and months. This dataset is often the best way to get historical values like kWh, pulse counts, etc. It also provides averages, min. and max. values, difference, and more. We make this data available to you via our Summary API in a very similar way to our Real-Time API.

You can use the Summary API definition to access the data you need, from 15 minutes to years of data. We have gone to great lengths to provide this data for free in order to add value to our metering systems. The Summary API, the Real-Time API, great affordable hardware, and scalable access to your data are all components of the most powerful, and highest value metering system available in the world.

We also have a Summary API Request Builder Tool found here: Summary API Builder

Summary V2 API

Summary V2 is a collection of new summary features that will continue to expand over time.

The API V2 summary and documentation are currently in beta, signifying that they are subject to changes and updates. It’s important to note that the API V2 calls and specifications provided in this documentation may undergo modifications as the beta phase progresses. Users should stay informed and regularly check for updates to ensure compatibility and adherence to the latest specifications.

Check our API Builder: API Builder

HTTPS Request

Here is a guide on making HTTPS requests to fetch information from ioStack devices.

ioStack HTTPS Request

Summary API request example

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=1&fields=Analog_In_1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call

def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?' \
'devices=55555&key=MTAxMDoyMDIw&format=json&' \
'report=15&limit=1&fields=Analog_In_1')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

# This example digs deeper into the JSON and displays the first
# Analog_In_1_Max value for the first summary read
summary = api_object[0]
analog_in_1_max = summary['Analog_In_1_Max']
pp "Analog_In_1_Max: #{analog_in_1_max}"

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary"
    "/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&"
    "format=json&report=15&limit=1&fields=Analog_In_1")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

# This example digs deeper into the JSON and displays the first
# Analog_In_1_Max value for the first summary read
summary = api_object[0]
analog_in_1_max = summary['Analog_In_1_Max']
print("Analog_In_1_Max: ", analog_in_1_max)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi(
  'https://summary.ekmpush.com/summary/api/v2/iostack?' .
  'devices=55555&key=MTAxMDoyMDIw&' .
  'format=json&report=15&limit=1&' .
  'fields=Analog_In_1'
);

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);


// This example digs deeper into the JSON and displays the first
// Analog_In_1_Max value for the first summary read
$summary = $apiObject[0];
$analog_in_1_max = $summary->Analog_In_1_Max;
echo "Analog_In_1_Max: $analog_in_1_max";


// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

  $json = @file_get_contents($apiRequest);
  $jsonObject = json_decode($json);
  return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&' .
    'format=json&report=15&limit=1&' .
    'fields=Analog_In_1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

# This example digs deeper into the JSON and displays the first
# Analog_In_1_Max value for the first summary read
my $summary     = $api_object->[0];
my $analog_in_1_max = $summary->{Analog_In_1_Max};

print "Analog_In_1_Max: $analog_in_1_max";    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        String apiUrl = "https://summary.ekmpush.com/summary/api/v2/iostack?" +
        "devices=55555&key=MTAxMDoyMDIw&" +
        "format=json&report=15&limit=1&" +
        "fields=Analog_In_1";

        JSONArray apiObject = EKM.callApi(apiUrl);

        // This just displays the object but you can use what ever
        // code you would like to work with the object here
        System.out.println(apiObject.toString(4));

        // This example digs deeper into the JSON and displays the first
        // Analog_In_1_Max value for the first summary read
        JSONObject summary = apiObject.getJSONObject(0);
        Object analogIn1Max = summary.get("Analog_In_1_Max");
        System.out.println("Analog_In_1_Max: " + analogIn1Max);
    }
}
<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=1&fields=Analog_In_1",
          function (apiObject) {
            //document.getElementById("result2").innerHTML = "<pre>hello</pre>";
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";

            // This example digs deeper into the JSON and displays the first
            // Analog_In_1_Max value for the first summary read
            summary = apiObject[0];
            analog_in_1_max = summary["Analog_In_1_Max"];
            document.getElementById("analog_in_1_max").innerHTML =
              "<pre>Analog_In_1_Max: " + analog_in_1_max + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result"></div>
    <div id="analog_in_1_max"></div>
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query and
// logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55555&key=MTAxMDoyMDIw&format=json' +
    '&report=15&limit=1&fields=Analog_In_1');

    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);

    // This example digs deeper into the JSON and displays the
    // Analog_In_1_Max value for the first summary read
    const summary = apiResData[0];
    const analogIn1Max = summary.Analog_In_1_Max;
    console.log(`Analog_In_1_Max: ${analogIn1Max}`);
  } catch (error) {
    console.error(error.message);
  }
})();

The above example returns the following results:

[
   {
      "End_Time_Stamp_UTC_ms":1706129098012,
      "Start_Time_Stamp_UTC_ms":1706128201790,
      "End_Date":"Wed Jan 24 2024 20:44:58 +0000 UTC",
      "Start_Date":"Wed Jan 24 2024 20:30:01 +0000 UTC",
      "Meter":55555,
      "Protocol":"io1",
      "Count":330,
      "Analog_In_1_Average":1271.09,
      "Analog_In_1_DeltaMin":-46,
      "Analog_In_1_DeltaMax":45,
      "Analog_In_1_Min":1235,
      "Analog_In_1_Max":1308,
      "Analog_In_1_MinTime":1706128352576,
      "Analog_In_1_MaxTime":1706128737993,
      "Analog_In_1_First":1278,
      "Analog_In_1_Last":1261
   }
]
[{"End_Time_Stamp_UTC_ms"=>1706129098012,
  "Start_Time_Stamp_UTC_ms"=>1706128201790,
  "End_Date"=>"Wed Jan 24 2024 20:44:58 +0000 UTC",
  "Start_Date"=>"Wed Jan 24 2024 20:30:01 +0000 UTC",
  "Meter"=>55555,
  "Protocol"=>"io1",
  "Count"=>330,
  "Analog_In_1_Average"=>1271.09,
  "Analog_In_1_DeltaMin"=>-46,
  "Analog_In_1_DeltaMax"=>45,
  "Analog_In_1_Min"=>1235,
  "Analog_In_1_Max"=>1308,
  "Analog_In_1_MinTime"=>1706128352576,
  "Analog_In_1_MaxTime"=>1706128737993,
  "Analog_In_1_First"=>1278,
  "Analog_In_1_Last"=>1261}]
"Analog_In_1_Max: 1308"
[{'Analog_In_1_Average': 1271.8,
  'Analog_In_1_DeltaMax': 43,
  'Analog_In_1_DeltaMin': -51,
  'Analog_In_1_First': 1272,
  'Analog_In_1_Last': 1269,
  'Analog_In_1_Max': 1323,
  'Analog_In_1_MaxTime': 1706129434027,
  'Analog_In_1_Min': 1230,
  'Analog_In_1_MinTime': 1706129453089,
  'Count': 313,
  'End_Date': 'Wed Jan 24 2024 20:59:59 +0000 UTC',
  'End_Time_Stamp_UTC_ms': 1706129999408,
  'Meter': 55555,
  'Protocol': 'io1',
  'Start_Date': 'Wed Jan 24 2024 20:45:00 +0000 UTC',
  'Start_Time_Stamp_UTC_ms': 1706129100183}]
Analog_In_1_Max:  1323
array(1) {
  [0]=>
  object(stdClass)#1 (16) {
    ["End_Time_Stamp_UTC_ms"]=>
    int(1706142367395)
    ["Start_Time_Stamp_UTC_ms"]=>
    int(1706141704559)
    ["End_Date"]=>
    string(34) "Thu Jan 25 2024 00:26:07 +0000 UTC"
    ["Start_Date"]=>
    string(34) "Thu Jan 25 2024 00:15:04 +0000 UTC"
    ["Meter"]=>
    int(55555)
    ["Protocol"]=>
    string(3) "io1"
    ["Count"]=>
    int(254)
    ["Analog_In_1_Average"]=>
    float(1270.85)
    ["Analog_In_1_DeltaMin"]=>
    int(-43)
    ["Analog_In_1_DeltaMax"]=>
    int(48)
    ["Analog_In_1_Min"]=>
    int(1238)
    ["Analog_In_1_Max"]=>
    int(1309)
    ["Analog_In_1_MinTime"]=>
    int(1706142240874)
    ["Analog_In_1_MaxTime"]=>
    int(1706142231939)
    ["Analog_In_1_First"]=>
    int(1293)
    ["Analog_In_1_Last"]=>
    int(1273)
  }
}
Analog_In_1_Max: 1309
$VAR1 = [
          {
            'Analog_In_1_DeltaMax' => 48,
            'Analog_In_1_MinTime' => '1706142240874',
            'Analog_In_1_Max' => 1309,
            'Count' => 254,
            'End_Time_Stamp_UTC_ms' => '1706142367395',
            'Start_Date' => 'Thu Jan 25 2024 00:15:04 +0000 UTC',
            'Meter' => 55555,
            'Analog_In_1_MaxTime' => '1706142231939',
            'Start_Time_Stamp_UTC_ms' => '1706141704559',
            'Analog_In_1_DeltaMin' => -43,
            'End_Date' => 'Thu Jan 25 2024 00:26:07 +0000 UTC',
            'Analog_In_1_First' => 1293,
            'Analog_In_1_Last' => 1273,
            'Analog_In_1_Average' => '1270.85',
            'Analog_In_1_Min' => 1238,
            'Protocol' => 'io1'
          }
        ];
Analog_In_1_Max: 1309
[{
    "Analog_In_1_DeltaMin": -43,
    "Start_Time_Stamp_UTC_ms": 1706141704559,
    "Meter": 55555,
    "Analog_In_1_Average": 1270.85,
    "End_Time_Stamp_UTC_ms": 1706142367395,
    "Analog_In_1_Min": 1238,
    "Count": 254,
    "End_Date": "Thu Jan 25 2024 00:26:07 +0000 UTC",
    "Analog_In_1_MaxTime": 1706142231939,
    "Analog_In_1_DeltaMax": 48,
    "Analog_In_1_Last": 1273,
    "Analog_In_1_MinTime": 1706142240874,
    "Analog_In_1_Max": 1309,
    "Analog_In_1_First": 1293,
    "Start_Date": "Thu Jan 25 2024 00:15:04 +0000 UTC",
    "Protocol": "io1"
}]
Analog_In_1_Max: 1309
[
    {
        "End_Time_Stamp_UTC_ms": 1706142367395,
        "Start_Time_Stamp_UTC_ms": 1706141704559,
        "End_Date": "Thu Jan 25 2024 00:26:07 +0000 UTC",
        "Start_Date": "Thu Jan 25 2024 00:15:04 +0000 UTC",
        "Meter": 55555,
        "Protocol": "io1",
        "Count": 254,
        "Analog_In_1_Average": 1270.85,
        "Analog_In_1_DeltaMin": -43,
        "Analog_In_1_DeltaMax": 48,
        "Analog_In_1_Min": 1238,
        "Analog_In_1_Max": 1309,
        "Analog_In_1_MinTime": 1706142240874,
        "Analog_In_1_MaxTime": 1706142231939,
        "Analog_In_1_First": 1293,
        "Analog_In_1_Last": 1273
    }
]
Analog_In_1_Max: 1309
[
  {
    End_Time_Stamp_UTC_ms: 1706143499763,
    Start_Time_Stamp_UTC_ms: 1706142665587,
    End_Date: 'Thu Jan 25 2024 00:44:59 +0000 UTC',
    Start_Date: 'Thu Jan 25 2024 00:31:05 +0000 UTC',
    Meter: 55555,
    Protocol: 'io1',
    Count: 312,
    Analog_In_1_Average: 1270.04,
    Analog_In_1_DeltaMin: -49,
    Analog_In_1_DeltaMax: 40,
    Analog_In_1_Min: 1230,
    Analog_In_1_Max: 1312,
    Analog_In_1_MinTime: 1706143198511,
    Analog_In_1_MaxTime: 1706142899845,
    Analog_In_1_First: 1279,
    Analog_In_1_Last: 1263
  }
]
Analog_In_1_Max: 1312

All ioStack summary v2 requests will start with the following information in the https address:

https://summary.ekmpush.com/summary/api/v2/iostack?

The information you provide, such as the ioStack address ID (i.e., 55555), your EKM Push Key (i.e., MTAxMDoyMDIw), and any other relevant details, will follow the initial https address.

Below is an example of what a typical ioStack summary v2 https address will look like:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=1&fields=Analog_In_1

Click to try

Example of the information that is in a typical https call is as follows:

https Address Description
https://summary.ekmpush.com/summary/api/v2/iostack? Start of the https address for ioStack summary v2.
devices Parameter for making a call to a specific ioStack.
55555 ioStack address to call.
key Parameter for calling the key.
MTAxMDoyMDIw EKM Push authorization key that is assigned to the ioStack device.
format Parameter for specifying the desired file format to be returned
html Language format to return the data as (HTML, XML, JSON, CSV)
report Parameter for calling a specific time period
15 This will display results in 15-minute summary increments, which is also the default time period the Summary API uses to return results if the report parameter is not specified.
limit Parameter that sets the number of rows to show in the report
1 This will display only one (1) row in the summary report. The default is ten (10) rows, which will appear in the report if the limit parameter is not specified.
field Parameter for calling specific fields in the report
Analog_In_1 Type of field to display in the summary results. This partial name ‘Analog_In_1’ will include all values in that field. For example, calling the Analog_In_1 parameter will include the _Average, _DeltaMin, _DeltaMax, _Min, _Max, _MinTime, _MaxTime, _First, and _Last values for the associated field.

Number and Key

The EKM Summary ioStack Number refers to the specific ioStack in your service. Throughout the examples in this Summary API document, we’ll consistently use the ioStack address 55555 in our https calls. To use your own ioStack address, simply substitute the provided example, 55555, with your unique ioStack address.

Similarly, the EKM Summary Key serves as the Authorization Key, identical to the one you obtained for your Realtime EKM Push Account. In the illustrations within this Summary API document, we’ll utilize the key MTAxMDoyMDIw for our https calls. Ensure to replace the sample key, MTAxMDoyMDIw, with your individual private key to gain access to the ioStacks associated with your account.

Get a Specific Device

This section demonstrates how to retrieve detailed information about a specific ioStack

Get a Specific ioStack

Get a Specific ioStack

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=5&fields=Analog_In_1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call

def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api(
  '/summary/api/v2/iostack?' \
  'devices=55555&key=MTAxMDoyMDIw&' \
  'format=json&report=15&limit=5&' \
  'fields=Analog_In_1'
)

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack\
?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=5&\
fields=Analog_In_1")


# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&' .
        'format=json&report=15&limit=5&' .
        'fields=Analog_In_1');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&' .
    'format=json&report=15&limit=5&' .
    'fields=Analog_In_1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&"+
            "format=json&report=15&limit=5&"+
            "fields=Analog_In_1");

        /*
         You can access any part of the apiObject using code like this:
         String Protocol = apiObject.getJSONObject(0).getString("Protocol");
        */

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=5&fields=Analog_In_1",

      function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55555&key=MTAxMDoyMDIw&' +
    '&format=json&report=15&limit=5&fields=Analog_In_1');

    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

In the provided example, we use the key MTAxMDoyMDIw and the ioStack address 55555.

For filtering to a single ioStack, you can include the filter: devices=IOSTACK_ID.


In the example below the IOSTACK_ID being used is: 55555

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=5&fields=Analog_In_1

The link provided below serves as an illustration of the read data associated with the respective ioStack:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=5&fields=Analog_In_1

Click to try


URL Parameters

Parameter Description
devices The ID or address of the ioStack device you want to retrieve

Query Multiple Devices

To retrieve data for multiple devices, utilize a tilde (~) between their identifiers when making the call. Following this, you can refer to some examples for clarification.

Query Multiple ioStacks

Query Multiple ioStacks

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55553~55555&key=MTAxMDoyMDIw&format=json&report=15&limit=5&fields=Analog_In_1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55553~55555'\
    '&key=MTAxMDoyMDIw&format=json&report=15&limit=5&fields=Analog_In_1')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack\
?devices=55553~55555&key=MTAxMDoyMDIw&format=json&\
report=15&limit=5&fields=Analog_In_1")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55553~55555&key=MTAxMDoyMDIw&' .
        'format=json&report=15&limit=5&' .
        'fields=Analog_In_1');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55553~55555&key=MTAxMDoyMDIw&' .
    'format=json&report=15&limit=5&' .
    'fields=Analog_In_1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55553~55555&key=MTAxMDoyMDIw&"+
            "format=json&report=15&limit=5&"+
            "fields=Analog_In_1");

        /*
         You can access any part of the apiObject using code like this:
         String Protocol = apiObject.getJSONObject(0).getString("Protocol");
        */

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55553~55555&key=MTAxMDoyMDIw&format=json&report=15&limit=5&fields=Analog_In_1",

          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55553~55555&key=MTAxMDoyMDIw&' +
    '&format=json&report=15&limit=5&fields=Analog_In_1');

    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

To view summaries for multiple ioStack devices, such as ioStack numbers 55553 and 55555, structure your HTTPS address as follows:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55553~55555&key=MTAxMDoyMDIw&format=html&report=15&limit=5&fields=Analog_In_1


As evident in the example above, the only modification made to the HTTPS address is the inclusion of an additional ioStack at the end of the address parameter: 55553~55555. This enables you to query multiple ioStack devices and retrieve their individual data readings.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55553~55555&key=MTAxMDoyMDIw&format=html&report=15&limit=5&fields=Analog_In_1

Click to try


Output Formats

Output Formats

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=xml&report=15&limit=1&timelimit=1&fields=Analog_In_1

The above URL returns XML structured like this:

<report_results>
<row>
<End_Time_Stamp_UTC_ms>1706647499362</End_Time_Stamp_UTC_ms>
<Start_Time_Stamp_UTC_ms>1706646604925</Start_Time_Stamp_UTC_ms>
<End_Date>Tue Jan 30 2024 20:44:59 +0000 UTC</End_Date>
<Start_Date>Tue Jan 30 2024 20:30:04 +0000 UTC</Start_Date>
<Meter>55555</Meter>
<Protocol>io1</Protocol>
<Count>335</Count>
<Analog_In_1_Average>1271.5</Analog_In_1_Average>
<Analog_In_1_DeltaMin>-43</Analog_In_1_DeltaMin>
<Analog_In_1_DeltaMax>44</Analog_In_1_DeltaMax>
<Analog_In_1_Min>1243</Analog_In_1_Min>
<Analog_In_1_Max>1311</Analog_In_1_Max>
<Analog_In_1_MinTime>1706647057346</Analog_In_1_MinTime>
<Analog_In_1_MaxTime>1706646804361</Analog_In_1_MaxTime>
<Analog_In_1_First>1276</Analog_In_1_First>
<Analog_In_1_Last>1260</Analog_In_1_Last>
</row>
</report_results>

Output format: JSON

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=1&timelimit=1&fields=Analog_In_1

The above URL returns JSON structured like this:

[
  {
    "End_Time_Stamp_UTC_ms": 1706647499362,
    "Start_Time_Stamp_UTC_ms": 1706646604925,
    "End_Date": "Tue Jan 30 2024 20:44:59 +0000 UTC",
    "Start_Date": "Tue Jan 30 2024 20:30:04 +0000 UTC",
    "Meter": 55555,
    "Protocol": "io1",
    "Count": 335,
    "Analog_In_1_Average": 1271.5,
    "Analog_In_1_DeltaMin": -43,
    "Analog_In_1_DeltaMax": 44,
    "Analog_In_1_Min": 1243,
    "Analog_In_1_Max": 1311,
    "Analog_In_1_MinTime": 1706647057346,
    "Analog_In_1_MaxTime": 1706646804361,
    "Analog_In_1_First": 1276,
    "Analog_In_1_Last": 1260
  }
]

Output format: CSV

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=csv&report=15&limit=1&timelimit=1&fields=Analog_In_1

The above URL returns CSV structured like this:

"End_Time_Stamp_UTC_ms","Start_Time_Stamp_UTC_ms","End_Date","Start_Date","Meter","Protocol","Count","Analog_In_1_Average","Analog_In_1_DeltaMin","Analog_In_1_DeltaMax","Analog_In_1_Min","Analog_In_1_Max","Analog_In_1_MinTime","Analog_In_1_MaxTime","Analog_In_1_First","Analog_In_1_Last"
1706647499362,1706646604925,"Tue Jan 30 2024 20:44:59 +0000 UTC","Tue Jan 30 2024 20:30:04 +0000 UTC",55555,"io1",335,1271.5,-43,44,1243,1311,1706647057346,1706646804361,1276,1260

You can request the summary results in various output formats, including HTML, XML, JSON, and CSV. To obtain a different format, simply modify the FORMAT to the desired type.

Example URL

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=FORMAT&report=15&limit=1&timelimit=1&fields=Analog_In_1


The example below will return the ioStack data in the HTML format. ( HyperText Markup Language )

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=1&timelimit=1&fields=Analog_In_1

Click to try


Click the link below to see the ioStack data returned in the XML format. ( Extensible Markup Language )

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=xml&report=15&limit=1&timelimit=1&fields=Analog_In_1

Click to try


Click the link below to see the ioStack data returned in the JSON format. ( JavaScript Object Notation )

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=1&timelimit=1&fields=Analog_In_1

Click to try


Click the link below to see the ioStack data returned in the CSV format. ( Comma Separated Values )

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=csv&report=15&limit=1&timelimit=1&fields=Analog_In_1

Click to try


URL Parameters

Parameter Description
format Available formats are: html, xml, json, and csv

History Reports

The report parameter defines the time period for which the summary results are returned.

ioStack Reports

Report

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&fields=Analog_In_1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55555'\
    '&key=MTAxMDoyMDIw&format=json&report=15&fields=Analog_In_1')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack\
?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&fields=Analog_In_1")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&' .
        'format=json&report=15&fields=Analog_In_1');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&' .
    'format=json&report=15&fields=Analog_In_1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&"+
            "format=json&report=15&fields=Analog_In_1");

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&fields=Analog_In_1",
          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55555&key=MTAxMDoyMDIw&' +
    '&format=json&report=15&fields=Analog_In_1');
    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

The available parameters are as follows: 15 for a 15-minute summary report, hr for an hourly summary report, dy for a daily summary report, wk for a weekly summary report, and mo for a monthly summary report. The range parameter is used to aggregate all summaries within the set date range into one summary report.

Replace REPORT with one of the report parameters to specify the desired ioStack reading interval

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=REPORT&fields=Analog_In_1


Example for the 15 minute summary report:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=Analog_In_1

Click to try


Example for the hr

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=hr&fields=Analog_In_1

Click to try


Example for the dy

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=dy&fields=Analog_In_1

Click to try


Example for the wk

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=wk&fields=Analog_In_1

Click to try


Example for the mo

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=mo&fields=Analog_In_1

Click to try


The example below is used when calling for a monthly summary report that is used in a billing cycle. Replace the # in the mo# call with a number correlating to a day of the month, between 2-28.

Example: report=mo15.

Example URL:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=mo#&fields=Analog_In_1

Example for the monthly range

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=mo15&fields=Analog_In_1

Click to try


Example for range

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=range&fields=Analog_In_1

Click to try


URL Parameters

Parameter Description
report 15, hr, dy, wk, mo, mo#, range

Other Reports

This section introduces various types of reports accessible through the V2 API.

Meter First/Last

First/Last API request example

curl -s 'https://summary.ekmpush.com/summary/api/v2/fl?key=MTAxMDoyMDIw&meters=17507,15635&report=both&format=json&timezone=America~New_york'
# Ruby Version: 3.1.2

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call

def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/fl?key=MTAxMDoyMDIw&meters=17507,15635'\
  '&report=both&format=json&timezone=America~New_york')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/fl\
?key=MTAxMDoyMDIw&meters=17507,15635\
&report=both&format=json&timezone=America~New_york")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.0.17 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject=callApi('https://summary.ekmpush.com/summary/api/v2/fl
?key=MTAxMDoyMDIw&meters=17507,15635&report=both&format=json&timezone=America~New_york');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest='')
{

        $json=@file_get_contents($apiRequest);
        $jsonObject=json_decode($json);
        return ($jsonObject);

}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
'https://summary.ekmpush.com/summary/api/v2/fl?key=MTAxMDoyMDIw&meters=17507,15635&report=both&format=json&timezone=America~New_york'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {
        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/fl?key=MTAxMDoyMDIw&meters=17507,15635&report=both&format=json&timezone=America~New_york");

        /*
         You can access any part of the apiObject using code like this:
         String Protocol = apiObject.getJSONObject(0).getString("Protocol");
        */

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}
/*
* Requirements
* NodeJS: v16.14.2
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/fl',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?key=MTAxMDoyMDIw&meters=17507,15635' +
    '&report=both&format=json&timezone=America~New_york');
    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">

// The example function is called from the
// body tag when the page loads
function example(){

// Call the callApi function to create a usable
// object named apiObject from the API request URL.
// Put the API request URL in the call
callApi('https://summary.ekmpush.com/summary/api/v2/fl?key=MTAxMDoyMDIw&meters=17507,15635&report=both&format=json&timezone=America~New_york',function(apiObject){

       // This just displays the object in the result div
       // you can use what ever code you would like to work
       // with the object here
       document.getElementById("result").innerHTML = "<pre>"+JSON.stringify(apiObject, null, 4)+"</pre>";
       });

};

// This code accesses the apiRequest URL and converts
// the contents to a usable JSON object named apiObject
function callApi(apiRequest,callback) {
    var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
      if (xhttp.readyState == 4 && xhttp.status == 200) {
        var jsonObject = JSON.parse(xhttp.responseText);
        callback(jsonObject);
      }
    };
    xhttp.open("GET", apiRequest, true);
    xhttp.send();
}
</script>

</head>
  <body onload="example()">
    <div id="result"/>
  </body>
</html>

All First/Last requests will commence with the following details in the HTTPS address:

https://summary.ekmpush.com/summary/api/v2/fl?

The information you provide, such as your EKM Push Key (i.e., MTAxMDoyMDIw), and all other relevant details will follow the HTTPS address.

Below is an example of what a typical First/Last HTTPS address will look like:

https://summary.ekmpush.com/summary/api/v2/fl?key=MTAxMDoyMDIw&meters=17507,15635&report=both&format=json

Click to try

URL Parameters

Parameter Description
meters [1 or more]
The number of the meter you want to retrieve (required, no default, multiple meters can be separated by , optional)
report [first/last/both]
first = If you only want the first reported time of a meter or group of meters
last = If you only want the last reported time of a meter or group of meters
both = If you want the first and last reported times of a meter or group of meters
format [xml, html, json or csv]
The format to output the summary data as: xml, html, json or csv

ioStack First/Last

First/Last API request example

curl -s 'https://summary.ekmpush.com/summary/api/v2/fl?key=MTAxMDoyMDIw&iostacks=55553,55555&report=both&format=json'
# Ruby Version: 3.1.2

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call

def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/fl?key=MTAxMDoyMDIw&'\
  'iostacks=55553,55555&report=both&format=json')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/fl\
?key=MTAxMDoyMDIw&iostacks=55553,55555&\
report=both&format=json")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.0.17 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmmetering.com/summary/api/v2/fl
?key=MTAxMDoyMDIw&iostacks=55553,55555&report=both&format=json');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmmetering.com/summary/api/v2/fl'
    . '?key=MTAxMDoyMDIw&iostacks=55553,55555'
    . '&report=both&format=json'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {
        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi(
        "https://summary.ekmmetering.com/summary/api/v2/fl"
        + "?key=MTAxMDoyMDIw&iostacks=55553,55555&"
        + "report=both&format=json"
);

        /*
         You can access any part of the apiObject using code like this:
         String Protocol = apiObject.getJSONObject(0).getString("Protocol");
        */

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}
/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmmetering.com/summary/api/v2/fl',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?key=MTAxMDoyMDIw&iostacks=55553,55555&' +
    'report=both&format=json');
    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmmetering.com/summary/api/v2/fl" +
            "?key=MTAxMDoyMDIw&iostacks=55553,55555" +
            "&report=both&format=json",
          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

If you want to retrieve the first, the last, or both reports for your ioStack(s), you need the following endpoint:

https://summary.ekmpush.com/summary/api/v2/fl?

Below is an example of what a typical First/Last HTTPS address will look like:

https://summary.ekmpush.com/summary/api/v2/fl?key=MTAxMDoyMDIw&iostacks=55553,55555&report=both&format=json

Click to try

URL Parameters

Parameter Description
iostacks [1 or more]
The number of the ioStack you want to retrieve (required, no default, multiple ioStacks can be separated by , optional)
report [first/last/both]
first = If you only want the first reported time of an ioStack or group of ioStacks
last = If you only want the last reported time of an ioStack or group of ioStacks
both = If you want the first and last reported times of an ioStack or group of ioStacks
format [xml, html, json or csv]
The format to output the summary data as: xml, html, json or csv

Gateway Reports

Gateway Reports API request example

curl -s 'https://summary.ekmpush.com/summary/api/v2/gstat?key=MTAxMDoyMDIw&mac=4016fa050ecd&format=json'
# Ruby Version: 3.1.2

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call

def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/gstat?key=MTAxMDoyMDIw&mac=4016fa050ecd&format=json')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.10.6
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/gstat\
?key=MTAxMDoyMDIw&mac=4016fa050ecd&format=json")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.1.2 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject=callApi('https://summary.ekmpush.com/summary/api/v2/gstat
?key=MTAxMDoyMDIw&mac=4016fa050ecd&format=json');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest='')
{

        $json=@file_get_contents($apiRequest);
        $jsonObject=json_decode($json);
        return ($jsonObject);

}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.34
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
'https://summary.ekmpush.com/summary/api/v2/gstat?key=MTAxMDoyMDIw&mac=4016fa050ecd&format=json'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {
        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/gstat?key=MTAxMDoyMDIw&mac=4016fa050ecd&format=json");

        /*
         You can access any part of the apiObject using code like this:
         String Protocol = apiObject.getJSONObject(0).getString("Protocol");
        */

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}
/*
* Requirements
* NodeJS: v16.19.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/gstat',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?key=MTAxMDoyMDIw&mac=4016fa050ecd&format=json');
    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">

// The example function is called from the
// body tag when the page loads
function example(){

// Call the callApi function to create a usable
// object named apiObject from the API request URL.
// Put the API request URL in the call
callApi('https://summary.ekmpush.com/summary/api/v2/gstat?key=MTAxMDoyMDIw&mac=4016fa050ecd&format=json',function(apiObject){

       // This just displays the object in the result div
       // you can use what ever code you would like to work
       // with the object here
       document.getElementById("result").innerHTML = "<pre>"+JSON.stringify(apiObject, null, 4)+"</pre>";
       });

};

// This code accesses the apiRequest URL and converts
// the contents to a usable JSON object named apiObject
function callApi(apiRequest,callback) {
    var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
      if (xhttp.readyState == 4 && xhttp.status == 200) {
        var jsonObject = JSON.parse(xhttp.responseText);
        callback(jsonObject);
      }
    };
    xhttp.open("GET", apiRequest, true);
    xhttp.send();
}
</script>

</head>
  <body onload="example()">
    <div id="result"/>
  </body>
</html>

The above example returns the following results:

[{"mac_address":"4016fa050ecd","key":"NjUzni10MzP6KDiyBvqXLUpqRTFmaDBrYTlJ","notify_email":"-","adminui_email":"info@ekmmetering.com","adminui_send_notice":true,"account_type":"Development","account_host":"appsrv.ekmmetering.com","purchase_date":" Sep 01 2022","mount_point":"/dev/mmcblk0p1","total_space":31154688,"free_space":3125408,"percent_used":90,"mem_available":272688,"load_avg":0.71,"ip_address":"DHCP 192.168.50.224","wan_ip_address":"-","eth0":1,"wlan0":"-","bandwidth":460000,"led_status":"running","reads":1,"summary":1,"devices":5,"last_reported":"Tue Apr 11 2023 12:54:44 UTC","last_reported_min":39,"last_good_time":"Tue Apr 11 2023 12:54:44 UTC","last_good_time_min":39,"uptime":30030,"ekmpush_version":"1.6815","ekmpushupdater_version":"0.0803","recovery_version":"1.6796"}]
[{"mac_address"=>"4016fa050ecd",
  "key"=>"NjUzni10MzP6KDiyBvqXLUpqRTFmaDBrYTlJ",
  "notify_email"=>"-",
  "adminui_email"=>"info@ekmmetering.com",
  "adminui_send_notice"=>true,
  "account_type"=>"Development",
  "account_host"=>"appsrv.ekmmetering.com",
  "purchase_date"=>" Sep 01 2022",
  "mount_point"=>"/dev/mmcblk0p1",
  "total_space"=>31154688,
  "free_space"=>3123904,
  "percent_used"=>90,
  "mem_available"=>272524,
  "load_avg"=>0.66,
  "ip_address"=>"DHCP 192.168.50.224",
  "wan_ip_address"=>"-",
  "led_status"=>"running",
  "reads"=>1,
  "summary"=>1,
  "devices"=>5,
  "last_reported"=>"Tue Apr 11 2023 01:09:52 UTC",
  "last_reported_min"=>33,
  "last_good_time"=>"Tue Apr 11 2023 01:09:52 UTC",
  "last_good_time_min"=>33,
  "uptime"=>30046,
  "ekmpush_version"=>"1.6815",
  "ekmpushupdater_version"=>"0.0803",
  "recovery_version"=>"1.6796"}]
[{'account_host': 'appsrv.ekmmetering.com',
  'account_type': 'Development',
  'adminui_email': 'info@ekmmetering.com',
  'adminui_send_notice': True,
  'bandwidth': 542000,
  'devices': 5,
  'ekmpush_version': '1.6815',
  'ekmpushupdater_version': '0.0803',
  'eth0': 1,
  'free_space': 3122080,
  'ip_address': 'DHCP 192.168.50.224',
  'key': 'NjUzni10MzP6KDiyBvqXLUpqRTFmaDBrYTlJ',
  'last_good_time': 'Tue Apr 11 2023 01:25:04 UTC',
  'last_good_time_min': 29,
  'last_reported': 'Tue Apr 11 2023 01:25:04 UTC',
  'last_reported_min': 29,
  'led_status': 'running',
  'load_avg': 0.77,
  'mac_address': '4016fa050ecd',
  'mem_available': 272500,
  'mount_point': '/dev/mmcblk0p1',
  'notify_email': '-',
  'percent_used': 90,
  'purchase_date': ' Sep 01 2022',
  'reads': 1,
  'recovery_version': '1.6796',
  'summary': 1,
  'total_space': 31154688,
  'uptime': 30061,
  'wan_ip_address': '-',
  'wlan0': '-'}]
array(1) {
  [0]=>
  object(stdClass)#1 (31) {
    ["mac_address"]=>
    string(12) "4016fa050ecd"
    ["key"]=>
    string(36) "NjUzni10MzP6KDiyBvqXLUpqRTFmaDBrYTlJ"
    ["notify_email"]=>
    string(1) "-"
    ["adminui_email"]=>
    string(20) "info@ekmmetering.com"
    ["adminui_send_notice"]=>
    bool(true)
    ["account_type"]=>
    string(11) "Development"
    ["account_host"]=>
    string(22) "appsrv.ekmmetering.com"
    ["purchase_date"]=>
    string(12) " Sep 01 2022"
    ["mount_point"]=>
    string(14) "/dev/mmcblk0p1"
    ["total_space"]=>
    int(31154688)
    ["free_space"]=>
    int(3122080)
    ["percent_used"]=>
    int(90)
    ["mem_available"]=>
    int(272500)
    ["load_avg"]=>
    float(0.77)
    ["ip_address"]=>
    string(19) "DHCP 192.168.50.224"
    ["wan_ip_address"]=>
    string(1) "-"
    ["eth0"]=>
    int(1)
    ["wlan0"]=>
    string(1) "-"
    ["bandwidth"]=>
    int(542000)
    ["led_status"]=>
    string(7) "running"
    ["reads"]=>
    int(1)
    ["summary"]=>
    int(1)
    ["devices"]=>
    int(5)
    ["last_reported"]=>
    string(28) "Tue Apr 11 2023 01:25:04 UTC"
    ["last_reported_min"]=>
    int(35)
    ["last_good_time"]=>
    string(28) "Tue Apr 11 2023 01:25:04 UTC"
    ["last_good_time_min"]=>
    int(35)
    ["uptime"]=>
    int(30061)
    ["ekmpush_version"]=>
    string(6) "1.6815"
    ["ekmpushupdater_version"]=>
    string(6) "0.0803"
    ["recovery_version"]=>
    string(6) "1.6796"
  }
}
$VAR1 = [
          {
            'uptime' => 30030,
            'last_reported_min' => 39,
            'ekmpush_version' => '1.6815',
            'notify_email' => '-',
            'last_good_time_min' => 39,
            'ip_address' => 'DHCP 192.168.50.224',
            'last_good_time' => 'Tue Apr 11 2023 12:54:44 UTC',
            'mount_point' => '/dev/mmcblk0p1',
            'mac_address' => '4016fa050ecd',
            'account_host' => 'appsrv.ekmmetering.com',
            'load_avg' => '0.71',
            'free_space' => 3125408,
            'percent_used' => 90,
            'total_space' => 31154688,
            'wan_ip_address' => '-',
            'key' => 'NjUzni10MzP6KDiyBvqXLUpqRTFmaDBrYTlJ',
            'adminui_email' => 'info@ekmmetering.com',
            'adminui_send_notice' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' ),
            'bandwidth' => 460000,
            'led_status' => 'running',
            'summary' => 1,
            'purchase_date' => ' Sep 01 2022',
            'mem_available' => 272688,
            'eth0' => 1,
            'wlan0' => '-',
            'last_reported' => 'Tue Apr 11 2023 12:54:44 UTC',
            'devices' => 5,
            'ekmpushupdater_version' => '0.0803',
            'reads' => 1,
            'recovery_version' => '1.6796',
            'account_type' => 'Development'
          }
        ];
[{
    "account_type": "Development",
    "led_status": "running",
    "last_reported_min": 37,
    "wlan0": "-",
    "mac_address": "4016fa050ecd",
    "last_reported": "Tue Apr 11 2023 01:40:14 UTC",
    "total_space": 31154688,
    "eth0": 1,
    "notify_email": "-",
    "last_good_time": "Tue Apr 11 2023 01:40:14 UTC",
    "mem_available": 272844,
    "key": "NjUzni10MzP6KDiyBvqXLUpqRTFmaDBrYTlJ",
    "adminui_send_notice": true,
    "summary": 1,
    "last_good_time_min": 37,
    "ekmpush_version": "1.6815",
    "bandwidth": 387000,
    "devices": 5,
    "recovery_version": "1.6796",
    "adminui_email": "info@ekmmetering.com",
    "mount_point": "/dev/mmcblk0p1",
    "reads": 1,
    "ekmpushupdater_version": "0.0803",
    "ip_address": "DHCP 192.168.50.224",
    "uptime": 30076,
    "percent_used": 90,
    "account_host": "appsrv.ekmmetering.com",
    "purchase_date": " Sep 01 2022",
    "free_space": 3120352,
    "load_avg": 0.68,
    "wan_ip_address": "-"
}]
[
  {
    mac_address: '4016fa050ecd',
    key: 'NjUzni10MzP6KDiyBvqXLUpqRTFmaDBrYTlJ',
    notify_email: '-',
    adminui_email: 'info@ekmmetering.com',
    adminui_send_notice: true,
    account_type: 'Development',
    account_host: 'appsrv.ekmmetering.com',
    purchase_date: ' Sep 01 2022',
    mount_point: '/dev/mmcblk0p1',
    total_space: 31154688,
    free_space: 3118560,
    percent_used: 90,
    mem_available: 271928,
    load_avg: 0.63,
    ip_address: 'DHCP 192.168.50.224',
    wan_ip_address: '-',
    eth0: 1,
    wlan0: '-',
    bandwidth: 362000,
    led_status: 'running',
    reads: 1,
    summary: 1,
    devices: 5,
    last_reported: 'Tue Apr 11 2023 01:55:23 UTC',
    last_reported_min: 34,
    last_good_time: 'Tue Apr 11 2023 01:55:23 UTC',
    last_good_time_min: 34,
    uptime: 30091,
    ekmpush_version: '1.6815',
    ekmpushupdater_version: '0.0803',
    recovery_version: '1.6796'
  }
]
[
    {
        "mac_address": "4016fa050ecd",
        "key": "NjUzni10MzP6KDiyBvqXLUpqRTFmaDBrYTlJ",
        "notify_email": "-",
        "adminui_email": "info@ekmmetering.com",
        "adminui_send_notice": true,
        "account_type": "Development",
        "account_host": "appsrv.ekmmetering.com",
        "purchase_date": " Sep 01 2022",
        "mount_point": "/dev/mmcblk0p1",
        "total_space": 31154688,
        "free_space": 3125408,
        "percent_used": 90,
        "mem_available": 272688,
        "load_avg": 0.71,
        "ip_address": "DHCP 192.168.50.224",
        "wan_ip_address": "-",
        "eth0": 1,
        "wlan0": "-",
        "bandwidth": 460000,
        "led_status": "running",
        "reads": 1,
        "summary": 1,
        "devices": 5,
        "last_reported": "Tue Apr 11 2023 12:54:44 UTC",
        "last_reported_min": 37,
        "last_good_time": "Tue Apr 11 2023 12:54:44 UTC",
        "last_good_time_min": 37,
        "uptime": 30030,
        "ekmpush_version": "1.6815",
        "ekmpushupdater_version": "0.0803",
        "recovery_version": "1.6796"
    }
]

This endpoint is for getting the status report of one or more gateways. This tool helps users see if or when their device goes offline, debug why, and to send an email notice when it happens.

All Gateway Reports (GStat) requests will start with the following HTTPS address:

https://summary.ekmpush.com/summary/api/v2/gstat?

The information you provide, including your EKM Push Key (e.g., MTAxMDoyMDIw), and all other relevant details will follow the HTTPS address.

The example below illustrates a typical GStat HTTPS address:

https://summary.ekmpush.com/summary/api/v2/gstat?key=MTAxMDoyMDIw&mac=4016fa050ecd&format=html

Click to try

URL Parameters

Parameter Description
key This could be the account or device key (does not work with meter key).
mac Gateway MAC address (gets just the requested gateway that matches that MAC, if the key is valid).
If you do not use the MAC, the request will display all gateways associated with the specified key.
time This is a number of minutes that will be used as a filter to display only gateways that have connected to the internet and reported to the server within the last N minutes.
offline This is a number, given in minutes, to display the devices that have been offline for a period of N time.
notify true or false. (Show only the gateways that have a notification email set).
type Production, Development, Staging, Locked. (Show only gateways of a certain account_type).
sortBy Sort the gateway list by the specified object key. See below for a list of object keys.
orderBy 1 or -1. Orders the sorted list
1 - ascending
-1 - descending
limit A number for how many rows to return.
skip A number for how many rows to skip.
format [xml, html, json or csv]
The format to output the summary data as: XML, HTML, JSON or CSV

Number of Summaries

In this section, you’ll discover a guide on how to get a specific number of readings from meters or ioStack devices. The guide provides clear instructions and examples to simplify the process of retrieving the required data from these devices. Whether you’re dealing with meters or ioStack devices, this resource aims to offer straightforward and helpful information for obtaining the desired readings.

Number of Summaries for ioStack

Number of Summaries

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=20&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55555'\
    '&key=MTAxMDoyMDIw&format=json&report=15&limit=20&'\
    'timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack?\
devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=20&\
timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=20&' .
        'timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=20&' .
    'timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=20&"+
            "timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1");

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?" +
            "devices=55555&key=MTAxMDoyMDIw&format=json&" +
            "report=15&limit=20&timezone=America~Los_Angeles&" +
            "fields=Analog_In_1~Pulse_Cnt_1",

          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=20&' +
    'timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1');
    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

The limit parameter specifies the quantity of rows to display in the summary results. If the limit parameter is absent from the URL, it will default to the number of rows shown on the results page, which is 10 (ten) rows by default. If your summary report yields more rows than the default limit, you must set the desired number of rows using the limit parameter. If you stick with the default, not all queried results will be visible in your summary.

The limit value can vary between 1 and the total number of summary rows you wish to showcase.

The following is an example of how your HTTPS address will appear when using the limit parameter:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=LIMIT&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1

Replace LIMIT with the number 20 to specify the quantity of rows to display in the summary results:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=20&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1


The link below will display an example of the ioStack data associated with the provided key and the specified limit of 20 summary rows on the results page, presenting it as HTML data:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=20&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1

Click to try


You can also request anywhere from 1 to 1000 rows to display in the summary results depending on your needs.

For 1 row replace LIMIT with the number 1 as in the example below:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=1&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1

Click to try


or for 1000 rows replace LIMIT with the number 1000 as in the example below:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=1000&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1

Click to try


URL Parameters

Parameters Description
limit Number of rows, ranging from 1 to 1000, to display on the summary results page.

Offset & Timelimit

The offset parameter is utilized for pagination in the summary results, while the timelimit parameter is used to calculate the default start_date.

ioStack Offset

Offset

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&offset=0&fields=Analog_In_1~Pulse_Cnt_1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55555&'\
    'key=MTAxMDoyMDIw&format=json&report=15&limit=10&'\
    'offset=0&fields=Analog_In_1~Pulse_Cnt_1')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack?\
devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&\
offset=0&fields=Analog_In_1~Pulse_Cnt_1")


# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&' .
        'offset=0&fields=Analog_In_1~Pulse_Cnt_1');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&' .
    'offset=0&fields=Analog_In_1~Pulse_Cnt_1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&"+
            "offset=0&fields=Analog_In_1~Pulse_Cnt_1");

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?" +
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&" +
            "offset=0&fields=Analog_In_1~Pulse_Cnt_1",

          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&' +
    'offset=0&fields=Analog_In_1~Pulse_Cnt_1');

    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

The offset can be set to zero (0) or any number greater. The default is zero (0) if not specified in the HTTPS address.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=10&offset=OFFSET&fields=Analog_In_1~Pulse_Cnt_1

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=10&offset=0&fields=Analog_In_1~Pulse_Cnt_1

Click to try

URL Parameter

Parameter Description
offset Any number from zero ( 0 ) to the number needed

ioStack Timelimit

Timelimit

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&fields=Analog_In_1&end_date=202402011200&timelimit=5"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55555&'\
    'key=MTAxMDoyMDIw&format=json&report=hr&'\
    'fields=Analog_In_1&end_date=202402011200&timelimit=5')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack?\
devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&\
fields=Analog_In_1&end_date=202402011200&timelimit=5")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&' .
        'fields=Analog_In_1&end_date=202402011200&timelimit=5');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&' .
    'fields=Analog_In_1&end_date=202402011200&timelimit=5');

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&"+
            "fields=Analog_In_1&end_date=202402011200&timelimit=5");

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?" +
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&" +
            "fields=Analog_In_1&end_date=202402011200&timelimit=5",

          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get(
      '?devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&' +
      'fields=Analog_In_1&end_date=202402011200&timelimit=5');

    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

The timelimit parameter serves solely to compute the default start_date. The value specified in the timelimit parameter is deducted from the end_date.

For instance, if you establish the timelimit as 5, the default start_date will commence 5 hours prior to the end_date. If the end_date is 12:00 P.M., the start_date will initiate at 7:00 A.M. Subsequently, your summary results will commence from that moment.


The timelimit parameter can be either 1 or any positive integer.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=hr&limit=25&timelimit=TIMELIMIT&fields=Analog_In_1


In the next case, we will use ‘timelimit = 5,’ indicating the retrieval of data from 5 hours prior to the current time:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=hr&fields=Analog_In_1&timelimit=5

Click to try


If you wish to set a specific end_date, such as 202402011200, and retrieve data from 5 hours before that time, you need to make the request as follows:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=hr&fields=Analog_In_1&end_date=202402011200&timelimit=5

Click to try


URL Parameter

Parameter Description
timelimit Any number from one ( 1 ) to the number needed

Time Zones

By default, the Summary Time Zone parameter will provide the time in milliseconds in UTC Time (computer time) and display it in the standard time format.

Visit the link below to access the Wikipedia database containing information about time zones and related details:

Click for Time Zone Information

Time Zones for ioStack

Time Zones

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&offset=0&timelimit=5&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55555&'\
    'key=MTAxMDoyMDIw&format=json&report=15&limit=10&offset=0&timelimit=5&'\
    'timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1')


# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack?\
devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&\
offset=0&timelimit=5&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1")


# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&' .
        'offset=0&timelimit=5&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&' .
    'offset=0&timelimit=5&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&"+
            "offset=0&timelimit=5&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1");

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?" +
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&" +
            "offset=0&timelimit=5&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1",

          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=10&' +
    'offset=0&timelimit=5&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1');

    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

If you want the time in a specific time zone, you can include that information in the URL.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=10&offset=0&timelimit=5&timezone=TIME_ZONE&fields=Analog_In_1~Pulse_Cnt_1

In the following example, the TIME_ZONE specified for the request is associated with the country of America, and the specific city where the ioStack is operational is Los Angeles.

The time zone for this location will align with the PACIFIC TIME ZONE, featuring a UTC offset of -8:00.


The provided link below will generate an HTML request corresponding to the specified parameters in the HTTPS address:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=10&offset=0&timelimit=5&timezone=America~Los_Angeles&fields=Analog_In_1~Pulse_Cnt_1

Click to try


Please follow the link below to access the Wikipedia database for information on time zones and related details.

Click for Time Zone Information


URL Parameters

Parameter Description
timezone The time zone corresponds to the country and city where ioStack is operational. For example: America~Los_Angeles.

Start Date & End Date

This section provides the option to request existing summary reports for a specific ioStack on a designated date.

ioStack Start Date & End Date

Start Date & End Date

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&limit=25&timezone=America~Los_Angeles&start_date=202401050900&end_date=202401060800&fields=Analog_In_1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55555&'\
    'key=MTAxMDoyMDIw&format=json&report=hr&limit=25&'\
    'timezone=America~Los_Angeles&start_date=202401050900&end_date=202401060800&'\
    'fields=Analog_In_1')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack?\
devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&limit=25&\
timezone=America~Los_Angeles&start_date=202401050900&end_date=202401060800&\
fields=Analog_In_1")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&limit=25&' .
        'timezone=America~Los_Angeles&start_date=202401050900&end_date=202401060800&' .
        'fields=Analog_In_1');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&limit=25&' .
    'timezone=America~Los_Angeles&start_date=202401050900&end_date=202401060800&' .
    'fields=Analog_In_1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&limit=25&"+
            "timezone=America~Los_Angeles&start_date=202401050900&end_date=202401060800&" +
            "fields=Analog_In_1");

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?" +
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&limit=25&" +
            "timezone=America~Los_Angeles&start_date=202401050900&end_date=202401060800&" +
            "fields=Analog_In_1",
          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55555&key=MTAxMDoyMDIw&format=json&report=hr&limit=25&' +
    'timezone=America~Los_Angeles&start_date=202401050900&end_date=202401060800&' +
    'fields=Analog_In_1');

    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

You can request existing summary reports for a specific ioStack on a designated date using the provided URL parameters:

https://summary.ekmpush.com/summary/api/v2/iostack? devices=55555&key=MTAxMDoyMDIw&format=html&report=hr&limit=25& timezone=America~Los_Angeles&start_date=YYYYMMDDhhmm&end_date=YYYYMMDDhhmm&fields=Analog_In_1

Date Parameters

Parameters Description
YYYY Indicates the year to be called. example: 2024
MM Indicates the month to be called. Example: 01, for the month of January
DD Indicates the day of the month. Example: 05, for the fifth day of the month
hh Indicates the hour of the day. Example: 0900, for 9 A.M.
mm Indicates the minutes of the hour. Example: 0930, for 30 minutes into the hour of 9 A.M. or 9:30 A.M.

Lets say you would like to pull the summary report for January 05, 2024 9:00 A.M. to January 06, 2024 8:00 A.M.. Your https address should look like the following:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=hr&limit=25&timezone=America~Los_Angeles&start_date=202401050900&end_date=202401060800&fields=Analog_In_1

Click the link below to see an example.

Click to try


The “range” parameter is utilized to amalgamate all summaries falling within the specified date range into a unified summary report.

Example of the range parameter for the report:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=range&timezone=America~Los_Angeles&start_date=202401050900&end_date=202401060800&fields=Analog_In_1

Click to try

URL Parameters

Parameter Description
start_date Date for the summary report to begin. Example of YYYYMMDDhhmm is as follows: 202401050900 = January 05, 2024 9:00 A.M.
end_date Data for the summary report to end. Example of YYYYMMDDhhmm is as follows: 202401060800 = January 06, 2024 8:00 A.M.

Hours

Get summary results for a specific ioStack by choosing a time within today.

ioStack - Hours

Hours

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&hours=1300-1530&fields=Analog_In_1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55555&'\
    'key=MTAxMDoyMDIw&format=json&report=15&hours=1300-1530&'\
    'fields=Analog_In_1')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack?\
devices=55555&key=MTAxMDoyMDIw&format=json&report=15&hours=1300-1530&\
fields=Analog_In_1")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&hours=1300-1530&' .
        'fields=Analog_In_1');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&hours=1300-1530&' .
    'fields=Analog_In_1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&hours=1300-1530&"+
            "fields=Analog_In_1");

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?" +
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&hours=1300-1530&" +
            "fields=Analog_In_1",

          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&hours=1300-1530&' +
    'fields=Analog_In_1');

    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

You can retrieve the available summary results for a specific ioStack by specifying the time within the current day using the following https ‘hours’ parameter. This parameter is utilized to display summary reports between the provided start and end hours. For example: 1300-1530.

hours: hhmm-hhmm ( default 0000-2359 from 0000 to 2359 hours )

Time parameters will adhere to the 24-hour clock format, also known as military time.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&hours=hhmm-hhmm&fields=Analog_In_1

Time Parameters

Parameter Description
hh Indicates the hour of the day. Example: 1300 for 1:00 P.M.
mm Indicates the minutes of the hour. Example: 1530 for 3:30 P.M.

Click the link below to view an example:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&hours=1300-1530&fields=Analog_In_1

Click to try


URL Parameters

Parameter Description
hours The Format in which the Time is written in: hhmm - hours, minutes. Example: 1530 for 3:30 P.M.

Days

The ‘days’ parameter works similarly to the 'hours’ parameter but is used to examine field values on specific days rather than at specific hours.

ioStack - Days

Days

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&fields=Analog_In_1&days=mon"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55555&'\
    'key=MTAxMDoyMDIw&format=json&report=15&'\
    'fields=Analog_In_1&days=mon')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack?\
devices=55555&key=MTAxMDoyMDIw&format=json&report=15&\
fields=Analog_In_1&days=mon")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&' .
        'fields=Analog_In_1&days=mon');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&' .
    'fields=Analog_In_1&days=mon'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&"+
            "fields=Analog_In_1&days=mon");

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?" +
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&" +
            "fields=Analog_In_1&days=mon",

          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&' +
    'fields=Analog_In_1&days=mon');
    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

Here’s an example of how an HTTPS request looks when fetching summary data using the 'days’ parameter.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=Analog_In_1&days=DAYS

Just replace DAYS with a day of the week.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=Analog_In_1&days=mon

Click to try

If you wish to include more than one day, simply use a tilde (~) between each of the desired days in the URL:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=500&fields=Analog_In_1&days=mon~tue~wed

Click to try


Click the link below to see an example.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=Analog_In_1&days=mon

Click to try


Days Parameters

Parameters Description
mon Monday
tue Tuesday
wed Wednesday
thu Thursday
fri Friday
sat Saturday
sun Sunday

Fields

This section is designed to display specific fields and avoid loading all of them. Some fields might be unnecessary for certain requests, so you can use filters to show only the ones you need.

ioStack Fields

Fields

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&fields=Analog_In_1~Pulse_Cnt_1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55555&'\
    'key=MTAxMDoyMDIw&format=json&report=15&'\
    'fields=Analog_In_1~Pulse_Cnt_1')


# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack?\
devices=55555&key=MTAxMDoyMDIw&format=json&report=15&\
fields=Analog_In_1~Pulse_Cnt_1")


# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&' .
        'fields=Analog_In_1~Pulse_Cnt_1');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&' .
    'fields=Analog_In_1~Pulse_Cnt_1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&"+
            "fields=Analog_In_1~Pulse_Cnt_1");

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?" +
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&" +
            "fields=Analog_In_1~Pulse_Cnt_1",

          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get('?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&' +
    'fields=Analog_In_1~Pulse_Cnt_1');

    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

If you want to filter and see only specific summary details, insert ‘fields=FIELDS’ into the address bar:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=FIELDS


In the example provided, we’re specifically looking for information on 'Analog_In_1’ and 'Pulse_Cnt_1.’ To fetch the data related to these fields, use the abbreviated names after the fields parameter, separated by a tilde (~) or a comma (,) if requesting more than one field:

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=Analog_In_1~Pulse_Cnt_1

Click to try


The example below is the same as the one above, except this shows the address with a comma after the fields name instead of the tilde separator.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=Analog_In_1,Pulse_Cnt_1

Including a part of the field name will display all corresponding field values linked to the specified field name.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=Analog_In_1~Pulse_Cnt_1

Click to try

If you include just a part of the name, it retrieves all the associated values linked to that specific field.

For example, when you call the field Analog_In_1, the results will include the following values:


If you prefer not to display all field results in your query or if you are only interested in a specific field value, you can specify it by adding the desired value at the end of the field’s name instead of just a part of the name.

Example: Analog_In_1_DeltaMax

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=Analog_In_1_DeltaMax

Click to try


Example: Analog_In_1_Last

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=Analog_In_1_Last

Click to try


If you wish to include multiple field values without retrieving all associated values for a given field, you should add each value to the address as if you were calling another field’s name.

Example: Analog_In_1_DeltaMax~Analog_In_1_Last

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&fields=Analog_In_1_DeltaMax~Analog_In_1_Last

Click to try


The examples provided are not limited to just these two data fields. You have the flexibility to add either a single field or as many fields as needed to fulfill your requirements.

URL Parameters

The fields below are the Summary fields for ioStack devices

FieldDescription
Analog_In_1*Analog Input 1
Show sub-fields

FieldDescription
Analog_In_2*Analog Input 2
Show sub-fields

FieldDescription
Analog_In_3*Analog Input 3
Show sub-fields

FieldDescription
Analog_In_4*Analog Input 4
Show sub-fields

FieldDescription
Pulse_Cnt_1*Total Lifetime Pulse Count Line 1
Show sub-fields

FieldDescription
Pulse_Cnt_2*Total Lifetime Pulse Count Line 2
Show sub-fields

FieldDescription
Pulse_Cnt_3*Total Lifetime Pulse Count Line 3
Show sub-fields

FieldDescription
Pulse_Cnt_4*Total Lifetime Pulse Count Line 4
Show sub-fields

FieldDescription
Pulse_Cnt_Rst_1*Resettable Pulse Count Line 1
Show sub-fields

FieldDescription
Pulse_Cnt_Rst_2*Resettable Pulse Count Line 2
Show sub-fields

FieldDescription
Pulse_Cnt_Rst_3*Resettable Pulse Count Line 3
Show sub-fields

FieldDescription
Pulse_Cnt_Rst_4*Resettable Pulse Count Line 4
Show sub-fields

FieldDescription
Pulse_Hold_ms_1*Pulse Input 1 Hold (milliseconds)
Show sub-fields

FieldDescription
Pulse_Hold_ms_2*Pulse Input 2 Hold (milliseconds)
Show sub-fields

FieldDescription
Pulse_Hold_ms_3*Pulse Input 3 Hold (milliseconds)
Show sub-fields

FieldDescription
Pulse_Hold_ms_4*Pulse Input 4 Hold (milliseconds)
Show sub-fields

FieldDescription
Pulse_Hi_Prev_ms_1*Pulse Input 1 Previous High (milliseconds)
Show sub-fields

FieldDescription
Pulse_Hi_Prev_ms_2*Pulse Input 2 Previous High (milliseconds)
Show sub-fields

FieldDescription
Pulse_Hi_Prev_ms_3*Pulse Input 3 Previous High (milliseconds)
Show sub-fields

FieldDescription
Pulse_Hi_Prev_ms_4*Pulse Input 4 Previous High (milliseconds)
Show sub-fields

FieldDescription
Pulse_Lo_Prev_ms_1*Pulse Input 1 Previous Low (milliseconds)
Show sub-fields

FieldDescription
Pulse_Lo_Prev_ms_2*Pulse Input 2 Previous Low (milliseconds)
Show sub-fields

FieldDescription
Pulse_Lo_Prev_ms_3*Pulse Input 3 Previous Low (milliseconds)
Show sub-fields

FieldDescription
Pulse_Lo_Prev_ms_4*Pulse Input 4 Previous Low (milliseconds)
Show sub-fields

FieldDescription
Pulse_Hi_Total_sec_1*Pulse Input 1 Total High (seconds)
Show sub-fields

FieldDescription
Pulse_Hi_Total_sec_2*Pulse Input 2 Total High (seconds)
Show sub-fields

FieldDescription
Pulse_Hi_Total_sec_3*Pulse Input 3 Total High (seconds)
Show sub-fields

FieldDescription
Pulse_Hi_Total_sec_4*Pulse Input 4 Total High (seconds)
Show sub-fields

FieldDescription
Pulse_Lo_Total_sec_1*Pulse Input 1 Total Low (seconds)
Show sub-fields

FieldDescription
Pulse_Lo_Total_sec_2*Pulse Input 2 Total Low (seconds)
Show sub-fields

FieldDescription
Pulse_Lo_Total_sec_3*Pulse Input 3 Total Low (seconds)
Show sub-fields

FieldDescription
Pulse_Lo_Total_sec_4*Pulse Input 4 Total Low (seconds)
Show sub-fields

FieldDescription
OW_1_1_degC*1-Wire Bus 1, Slot 1: ºC
Show sub-fields

FieldDescription
OW_1_2_degC*1-Wire Bus 1, Slot 2: ºC
Show sub-fields

FieldDescription
OW_1_3_degC*1-Wire Bus 1, Slot 3: ºC
Show sub-fields

FieldDescription
OW_1_4_degC*1-Wire Bus 1, Slot 4: ºC
Show sub-fields

FieldDescription
OW_2_1_degC*1-Wire Bus 2, Slot 1: ºC
Show sub-fields

FieldDescription
OW_2_2_degC*1-Wire Bus 2, Slot 2: ºC
Show sub-fields

FieldDescription
OW_2_3_degC*1-Wire Bus 2, Slot 3: ºC
Show sub-fields

FieldDescription
OW_2_4_degC*1-Wire Bus 2, Slot 4: ºC
Show sub-fields

FieldDescription
OW_3_1_degC*1-Wire Bus 3, Slot 1: ºC
Show sub-fields

FieldDescription
OW_3_2_degC*1-Wire Bus 3, Slot 2: ºC
Show sub-fields

FieldDescription
OW_3_3_degC*1-Wire Bus 3, Slot 3: ºC
Show sub-fields

FieldDescription
OW_3_4_degC*1-Wire Bus 3, Slot 4: ºC
Show sub-fields

FieldDescription
OW_4_1_degC*1-Wire Bus 4, Slot 1: ºC
Show sub-fields

FieldDescription
OW_4_2_degC*1-Wire Bus 4, Slot 2: ºC
Show sub-fields

FieldDescription
OW_4_3_degC*1-Wire Bus 4, Slot 3: ºC
Show sub-fields

FieldDescription
OW_4_4_degC*1-Wire Bus 4, Slot 4: ºC
Show sub-fields

FieldDescription
OW_1_1_Humidity*1-Wire Bus 1, Slot 1: Humidity
Show sub-fields

FieldDescription
OW_1_2_Humidity*1-Wire Bus 1, Slot 2: Humidity
Show sub-fields

FieldDescription
OW_1_3_Humidity*1-Wire Bus 1, Slot 3: Humidity
Show sub-fields

FieldDescription
OW_1_4_Humidity*1-Wire Bus 1, Slot 4: Humidity
Show sub-fields

FieldDescription
OW_2_1_Humidity*1-Wire Bus 2, Slot 1: Humidity
Show sub-fields

FieldDescription
OW_2_2_Humidity*1-Wire Bus 2, Slot 2: Humidity
Show sub-fields

FieldDescription
OW_2_3_Humidity*1-Wire Bus 2, Slot 3: Humidity
Show sub-fields

FieldDescription
OW_2_4_Humidity*1-Wire Bus 2, Slot 4: Humidity
Show sub-fields

FieldDescription
OW_3_1_Humidity*1-Wire Bus 3, Slot 1: Humidity
Show sub-fields

FieldDescription
OW_3_2_Humidity*1-Wire Bus 3, Slot 2: Humidity
Show sub-fields

FieldDescription
OW_3_3_Humidity*1-Wire Bus 3, Slot 3: Humidity
Show sub-fields

FieldDescription
OW_3_4_Humidity*1-Wire Bus 3, Slot 4: Humidity
Show sub-fields

FieldDescription
OW_4_1_Humidity*1-Wire Bus 4, Slot 1: Humidity
Show sub-fields

FieldDescription
OW_4_2_Humidity*1-Wire Bus 4, Slot 2: Humidity
Show sub-fields

FieldDescription
OW_4_3_Humidity*1-Wire Bus 4, Slot 3: Humidity
Show sub-fields

FieldDescription
OW_4_4_Humidity*1-Wire Bus 4, Slot 4: Humidity
Show sub-fields

FieldDescription
OW_1_1_Lux*1-Wire Bus 1, Slot 1: Lux
Show sub-fields

FieldDescription
OW_1_2_Lux*1-Wire Bus 1, Slot 2: Lux
Show sub-fields

FieldDescription
OW_1_3_Lux*1-Wire Bus 1, Slot 3: Lux
Show sub-fields

FieldDescription
OW_1_4_Lux*1-Wire Bus 1, Slot 4: Lux
Show sub-fields

FieldDescription
OW_2_1_Lux*1-Wire Bus 2, Slot 1: Lux
Show sub-fields

FieldDescription
OW_2_2_Lux*1-Wire Bus 2, Slot 2: Lux
Show sub-fields

FieldDescription
OW_2_3_Lux*1-Wire Bus 2, Slot 3: Lux
Show sub-fields

FieldDescription
OW_2_4_Lux*1-Wire Bus 2, Slot 4: Lux
Show sub-fields

FieldDescription
OW_3_1_Lux*1-Wire Bus 3, Slot 1: Lux
Show sub-fields

FieldDescription
OW_3_2_Lux*1-Wire Bus 3, Slot 2: Lux
Show sub-fields

FieldDescription
OW_3_3_Lux*1-Wire Bus 3, Slot 3: Lux
Show sub-fields

FieldDescription
OW_3_4_Lux*1-Wire Bus 3, Slot 4: Lux
Show sub-fields

FieldDescription
OW_4_1_Lux*1-Wire Bus 4, Slot 1: Lux
Show sub-fields

FieldDescription
OW_4_2_Lux*1-Wire Bus 4, Slot 2: Lux
Show sub-fields

FieldDescription
OW_4_3_Lux*1-Wire Bus 4, Slot 3: Lux
Show sub-fields

FieldDescription
OW_4_4_Lux*1-Wire Bus 4, Slot 4: Lux
Show sub-fields

Normalize

The normalize parameter ensures that Start Date times and End Date times align with specified intervals based on the “report” type. Start times are rounded to the nearest :00 seconds, and end times to the nearest :59 seconds, with hours and minutes adjusting according to the “report” type parameter.

For example, with a report parameter set to 15 (15 minutes), each row in the summary report will show start times at 15-minute intervals: 09:00:00, 09:15:00, 09:30:00, etc. The corresponding end times will be 15 minutes after the start time: 09:14:59, 09:29:59, 09:44:59, etc.

If the URL lacks the normalize parameter, it defaults to zero (0). The default means summary reports won’t round start times to :00 seconds and end times to :59 seconds. To display summary reports with start times at :00 seconds and end times at :59 seconds, use the normalize parameter set to one (1).

ioStack - Normalize

Normalize

curl -s "https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&limit=12&fields=Analog_In_1&normalize=1"
# Ruby Version: 3.3.0

# Load required modules
require 'net/http'
require 'json'
require 'uri'

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
def call_api(api_path)
  uri = URI.parse("https://summary.ekmpush.com#{api_path}")
  response = Net::HTTP.get_response(uri)
  puts response.uri
  JSON.parse(response.body)
end

# Call the call_api method to create a usable
# object named api_object from the API request URI
# Put the API request URI in the call
# URI only NOT URL - Do not include https://summary.ekmpush.com
api_object = call_api('/summary/api/v2/iostack?devices=55555&'\
    'key=MTAxMDoyMDIw&format=json&report=15&'\
    'limit=12&fields=Analog_In_1&normalize=1')

# This just displays the object but you can use what ever
# code you would like to work with the object here
require 'pp'
pp api_object

'''
Python version: 3.9.12
'''

# Required Python Modules
import urllib.request
import urllib.error
import urllib.parse
import json
import pprint

# This function accesses the api_request URL and converts
# the contents to a usable Python object and returns it
def call_api ( api_request ):
    '''Make http request'''
    response = urllib.request.urlopen(api_request)
    response = response.read()
    json_object = json.loads(response.decode())
    return json_object

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
api_object = call_api("https://summary.ekmpush.com/summary/api/v2/iostack?\
devices=55555&key=MTAxMDoyMDIw&format=json&report=15&\
limit=12&fields=Analog_In_1&normalize=1")

# This just displays the object but you can use what ever
# code you would like to work with the object here
pprint.pprint(api_object)

<?php
// PHP 8.2.14 (cli)

// Call the callApi function to create a usable
// object named $apiObject from the API request URL.
// Put the API request URL in the call
$apiObject = callApi('https://summary.ekmpush.com/summary/api/v2/iostack?' .
        'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&' .
        'limit=12&fields=Analog_In_1&normalize=1');

// This just displays the object but you can use what ever
// code you would like to work with the object here
var_dump($apiObject);

// This function accesses the apiRequest URL and converts
// the contents to a usable PHP object and returns it
function callApi($apiRequest = '')
{

        $json = @file_get_contents($apiRequest);
        $jsonObject = json_decode($json);
        return ($jsonObject);
}

#!/usr/bin/perl
# Perl version: v5.34
# CPAN.pm version 2.2
# Perl Modules Version:
# JSON: 4.05
# LWP::Protocol::https: 6.10
# LWP::Simple: 6.62
#
# OS Prerequisites
# UBUNTU
# apt install cpanminus
#
# Install Perl Modules
#       cpan LWP::Simple
#       cpan LWP::Protocol::https
#       cpan JSON

# Required Perl Modules
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;

# This function accesses the api_request URL and converts
# the contents to a usable Perl object and returns it
sub call_api {
    my $api_request = shift;
    my $json_text   = get($api_request);
    my $json_object = JSON->new->utf8->decode($json_text);
    return $json_object;
}

# Call the call_api function to create a usable
# object named api_object from the API request URL.
# Put the API request URL in the call
my $api_object = call_api(
    'https://summary.ekmpush.com/summary/api/v2/iostack?' .
    'devices=55555&key=MTAxMDoyMDIw&format=json&report=15&' .
    'limit=12&fields=Analog_In_1&normalize=1'
);

# This just displays the object but you can use what ever
# code you would like to work with the object here
print Dumper($api_object);    ## no critic (InputOutput::RequireCheckedSyscalls)

/*
 openjdk version "17.0.2" 2022-01-18

 Download the correct org.json jar version for your
 needs from: https://mvnrepository.com/artifact/org.json/json

 This example uses version 20220320 accessible here:
 https://repo1.maven.org/maven2/org/json/json/20220320/json-20220320.jar

 Instructions to run this program

 1. Put this code in a file named EKM.java
 2. Copy the downloaded org.json jar and EKM.java to the same directory
 3. Compile
  javac -cp .:./json-20220320.jar ./EKM.java
 4. Run
  java -cp .:./json-20220320.jar EKM
*/

//Import required classes
import java.net.*;
import java.io.*;
import org.json.*;

@java.lang.SuppressWarnings({"java:S106", "java:S112", "java:S125"})

public class EKM {
    public static JSONArray callApi(String apiRequest) throws Exception {

        // This code accesses the apiRequest URL and converts
        // the contents to a usable JSON object

        URL url = new URL(apiRequest);
        URLConnection connection = url.openConnection();
        BufferedReader in = new BufferedReader(
                                               new InputStreamReader(
                                                                     connection.getInputStream()));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        return new JSONArray(response.toString());
    }

    public static void main(String[] args) throws Exception {

        /*
         Call callApi to create a usable
         object named apiObject from the API request URL.
         Put the API request URL in the call
         */
        JSONArray apiObject = EKM.callApi("https://summary.ekmpush.com/summary/api/v2/iostack?"+
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&"+
            "limit=12&fields=Analog_In_1&normalize=1");

        // This just outputs the whole apiObject
        System.out.println(apiObject.toString(4));
    }
}

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      // The example function is called from the
      // body tag when the page loads
      function example() {
        // Call the callApi function to create a usable
        // object named apiObject from the API request URL.
        // Put the API request URL in the call
        callApi(
          "https://summary.ekmpush.com/summary/api/v2/iostack?" +
            "devices=55555&key=MTAxMDoyMDIw&format=json&report=15&" +
            "limit=12&fields=Analog_In_1&normalize=1",

          function (apiObject) {
            // This just displays the object in the result div
            // you can use what ever code you would like to work
            // with the object here
            document.getElementById("result").innerHTML =
              "<pre>" + JSON.stringify(apiObject, null, 4) + "</pre>";
          }
        );
      }

      // This code accesses the apiRequest URL and converts
      // the contents to a usable JSON object named apiObject
      function callApi(apiRequest, callback) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function () {
          if (xhttp.readyState == 4 && xhttp.status == 200) {
            var jsonObject = JSON.parse(xhttp.responseText);
            callback(jsonObject);
          }
        };
        xhttp.open("GET", apiRequest, true);
        xhttp.send();
      }
    </script>
  </head>
  <body onload="example()">
    <div id="result" />
  </body>
</html>

/*
* Requirements
* NodeJS: v20.10.0
* Axios:  0.27.2
*/

const axios = require('axios');

const apiClient = axios.create({
  baseURL: 'https://summary.ekmpush.com/summary/api/v2/iostack',
  timeout: 1000 * 15,
  // The API may respond with different status codes
  // you want to see them in order to debug you query
  // This will return all codes between 200 ans 503
  validateStatus: (status) => status >= 200 && status < 504,
})

// This code accesses the apiRequest query
// and logs the response data or the error
;(async () => {
  try {
    const res = await apiClient.get(
      '?devices=55555&key=MTAxMDoyMDIw&format=json&report=15&' +
      'limit=12&fields=Analog_In_1&normalize=1');

    const apiResData = res.data;
    // This just displays the object but you can use what ever
    // code you would like to work with the object here
    console.log(apiResData);
  } catch (error) {
    console.error(error.message);
  }
})();

The following example illustrates how the HTTPS address will appear when utilizing the normalize parameter with the report type set to 15 (15 minutes).

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=12&fields=Analog_In_1&normalize=1

Click to try

The example below is without the normalize parameter.

https://summary.ekmpush.com/summary/api/v2/iostack?devices=55555&key=MTAxMDoyMDIw&format=html&report=15&limit=12&fields=Analog_In_1

Click to try

RS-485 Communications

Click here to go to RS-485 Documentation

This section is for developers, or individuals, that want to communicate with their EKM Meters directly using their own software or embedded solution.

The code examples found in this section are in the simplest possible method to get you started. You are welcome to make them more robust.

First we start you out just connecting to the meter. You will find there is a very simple command line process to help you get started.

After that we cover the CRC method required for most communication to the meter.

Then we put it all together, in a simple test script that will show reads, and also open and close the relays.

Last we cover how to convert the 255 character strings that the meter responds with to a usable array containing field names and their values. It is our hope that after you go through these steps you will have all the information you need, to build whatever tools you like to access the meter.

Our meters use an IEC 62056-21 communication standard that has been optimized for our own needs. We are more than happy to share this with you. With this you can write your own software or embedded solution to access your meter data.

IEC 62056 is a set of standards for Electricity metering data exchange by International Electrotechnical Commission.

To learn more about the IEC 62056 standard click the button below to visit the WikiPedia website.

Additional PDF docs are available:

v.3 Meter Settings Protocol

v.3 Meter Parsing

v.4/v.5 Meter Settings Protocol

v.4/v.5 Meter Parsing

v.4/v.5 Meter Alternate Modbus Protocol

If you are coding in Python you can also make use of our ekmmeters.py API.

Status Codes

EKM uses conventional HTTP response codes in addition to our API Status Codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided, and codes in the 5xx range indicate an error with EKM’s servers (these are rare).

The EKM API uses the following API specific Status codes:

API Status Code Meaning
1000 There is not data for: {meters}
1001 There is not data for: {meters} between ${startDate} and ${endDate}
1002 There is not data for: {meters} This meter first reported on:
1003 There is not data for: {meters} This meter last reported on:
1004 Timezone is not supported for this date range request
1100 All invalid query requests
1101 Invalid format
1102 Invalid value
1103 Invalid parameter
1200 Found invalid meter: {meter} for key: MTAxMDoyMDIw
1300 Oops! It looks like there was an unexpected error. Try checking your query for issues or hold tight while we see what we can do. This error has been reported.

The EKM API also uses the following HTTP Status codes:

HTTP Status Code Meaning
200 OK – The request succeeded.
400 Bad Request – The server could not understand the request due to invalid syntax.
401 Unauthorized – Although the HTTP standard specifies “unauthorized”, semantically this response means “unauthenticated”. That is, the client must authenticate itself to get the requested response.
403 Forbidden – The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client’s identity is known to the server.
404 Not Found – The server can not find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.
429 Too Many Requests – The user has sent too many requests in a given amount of time (“rate limiting”).
500 Internal Server Error – The server has encountered a situation it does not know how to handle.
501 Not Implemented – The Vertical Bar otherwise known as “pipe” request method is not supported by the server and cannot be handled. The only methods that servers are required to support (and therefore that must not return this code) are GET and HEAD.
502 Bad Gateway – This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.
503 Service Unavailable – The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This response should be used for temporary conditions and the Retry-After HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.
504 Gateway Timeout – This error response is given when the server is acting as a gateway and cannot get a response in time.
505 HTTP Version Not Supported – The HTTP version used in the request is not supported by the server.
506 Variant Also Negotiates – The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.
510 Not Extended – Further extensions to the request are required for the server to fulfill it.
511 Network Authentication Required – Indicates that the client needs to authenticate to gain network access.

Widget Documentation

Click here to go to Widget Documentation

Access free web-based real-time and historical graphs showcasing your EKM Push data, covering all your devices including meters and ioStacks. It’s quick, easy, and doesn’t require a login.

The EKM Widget offers a convenient means to gain visual insights into your systems’ performance. We utilize it to monitor our office’s current consumption and solar power generation in real-time. Additionally, the historical chart helps us track the impact of efficiency upgrades on our usage and monitor the energy consumption of our electric car over time.