Beispiel

Navigation:  Zusatzfunktionen > Datenschnittstelle über JSON >

Beispiel

Previous pageReturn to chapter overviewNext page

Beispiel einer Datenabfrage:

 

POST /component/control-system-get-value/api_key/F2E1101D72EA1A3327136EB6AFEB4C81

HTTP/1.1

Host: example.edl.ch

Connection: keep-alive

Content-Type: application/json

Content-Length: 38299

{

  "get": [

    {"path":"EXAMPLE001:T11:MN:003:Vis:VMC_energy1"},

    {"path":"EXAMPLE001:T11:MN:003:Vis:VEnergy1V"},

    {"path":"EXAMPLE001:T11:MN:003:Vis:VMC_power"},

    {"path":"EXAMPLE001:not:existing"}

  ]

}

 

Beispiel einer Datenantwort:

 

HTTP/1.1 200 OK

Date: Fri, 27 Feb 2015 13:37:08 GMT

Server: Apache

Expires: Thu, 19 Nov 1981 08:52:00 GMT

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma: no-cache

Keep-Alive: timeout=5, max=100

Connection: Keep-Alive

Transfer-Encoding: chunked

Content-Type: application/json; charset=utf-8

{

  "get": [

    {

      "code":"ok",

      "path":"EXAMPLE001:T11:MN:003:Vis:VMC_energy1",

      "value":3.165,

      "type":"double",

      "stamp":"2015-02-27T08:17:51"

    },

    {

      "code":"ok",

      "path":"EXAMPLE001:T11:MN:003:Vis:VEnergy1V",

      "value":0.14,

      "type":"double",

      "stamp":"2015-02-27T08:17:51"

    },

    {

      "code":"no perm",

      "path":"EXAMPLE001:T11:MN:003:Vis:VEnergy1V",

    },

    {

      "code":"not found",

      "path":"EXAMPLE001:not:existing",

      "message":"Data point doesn't exist"

    }

  ]

}