Streaming Admin API vs Streaming API

<< Click to Display Table of Contents >>

Navigation:  The API > JSON Adminstrator API > Understanding the admin API >

Streaming Admin API vs Streaming API

Overview

 

As opposed to the streaming-API which delivers states and then telegrams, the admin streaming-API delivers devices including states followed by the telegrams.

On initial connect with admin privileges you will see JSON data like this:

 

Admin streaming-API

Streaming API

{
  "header" : {
    "httpStatus" : 200,
    "content" : "devices",
    "gateway" : "DC-GW/EO-IP v0.99.1",
    "timestamp" : "2016-05-10T14:10:10.604+0200"
  },
  "devices" : [ {
    "deviceId" : "FFF26803",
    "friendlyId" : "Peha_Ch2",
    "learnInProcedure" : "UTE",
    "eeps" : [ {
      "eep" : "D2-01-08",
      "version" : 1.0,
      "direction" : "both"
    } ],
    "manufacturer" : "Peha",
    "firstSeen" : "2016-05-09T09:27:05.260+0200",
    "lastSeen" : "2016-05-09T16:46:30.822+0200",
    "secured" : false,
    "softSmartAck" : false,
    "transmitModes" : [ {
      "key" : "overcurrentSwitchOff",
      "transmitOnConnect" : true,
      "transmitOnEvent" : true,
      "transmitOnDuplicate" : true
    }, {
      "key" : "power",
      "transmitOnConnect" : true,
      "transmitOnEvent" : true,
      "transmitOnDuplicate" : true
    }, {
      "key" : "localControl",
      "transmitOnConnect" : true,
      "transmitOnEvent" : true,
      "transmitOnDuplicate" : true
    }, {
      "key" : "energy",
      "transmitOnConnect" : true,
      "transmitOnEvent" : true,
      "transmitOnDuplicate" : true
    }, {
      "key" : "errorLevel",
      "transmitOnConnect" : true,
      "transmitOnEvent" : true,
      "transmitOnDuplicate" : true
    }, {
      "key" : "switch",
      "transmitOnConnect" : true,
      "transmitOnEvent" : true,
      "transmitOnDuplicate" : true
    } ],
    "states" : [ {
      "key" : "errorLevel",
      "value" : "notSupported",
      "meaning" : "Error level not supported",
      "timestamp" : "2016-05-09T16:46:30.822+0200",
      "age" : 77019782
    }, {
      "key" : "localControl",
      "value" : "on",
      "meaning" : "Local control enabled",
      "timestamp" : "2016-05-09T16:46:30.822+0200",
      "age" : 77019782
    }, {
      "key" : "overcurrentSwitchOff",
      "value" : "false",
      "meaning" : "Over current switch off: ready / not supported",
      "timestamp" : "2016-05-09T16:46:30.822+0200",
      "age" : 77019782
    }, {
      "key" : "switch",
      "value" : "off",
      "meaning" : "Output value OFF",
      "timestamp" : "2016-05-09T16:46:30.822+0200",
      "age" : 77019782
    } ],
    "operable" : true,
    "supported" : true
  }

 

(...)

{
  "header" : {
    "httpStatus" : 200,
    "content" : "states",
    "gateway" : "DC-GW/EO-IP v0.99.1",
    "timestamp" : "2016-05-10T14:15:01.323+0200"
  },
  "states" : [ {
    "deviceId" : "FFF26803",
    "friendlyId" : "Peha_Ch2",
    "functions" : [ {
      "key" : "errorLevel",
      "value" : "notSupported",
      "meaning" : "Error level not supported",
      "timestamp" : "2016-05-09T16:46:30.822+0200",
      "age" : 77310501
    }, {
      "key" : "localControl",
      "value" : "on",
      "meaning" : "Local control enabled",
      "timestamp" : "2016-05-09T16:46:30.822+0200",
      "age" : 77310501
    }, {
      "key" : "overcurrentSwitchOff",
      "value" : "false",
      "meaning" : "Over current switch off: ready / not supported",
      "timestamp" : "2016-05-09T16:46:30.822+0200",
      "age" : 77310501
    }, {
      "key" : "switch",
      "value" : "off",
      "meaning" : "Output value OFF",
      "timestamp" : "2016-05-09T16:46:30.822+0200",
      "age" : 77310501
    } ]
  }

 

(...)

 

 

There will be more JSON Types as the admin-API will get more features over the time.