path: /api/v1/data
All descriptive data points have changeable states. The value is firmly linked to the process endpoint. The value at position "0" belongs to the process at position "0" in the process endpoint.
The structure at
/api/v1/process/entries/0
contains the configuration for the data point at
In addition to the pure values, a timestamp of the last change and an error code of the IO is provided, too. The following listing shows an exemplary data endpoint.
{
"time": 1504607508,
"entries": [
{
"pin": 347.000,
"time": 1504607505,
"error": 0,
"Json+typeName": "MkcJsonLib.jDataAi",
"Json+typeRevision": 0
},
{
"pin": 0.004,
"time": 1504607504,
"error": 0,
"Json+typeName": "MkcJsonLib.jDataAo",
"Json+typeRevision": 0
},
{
"pin": true,
"time": 1504607508 ,
"error": 0,
"Json+typeName": "MkcJsonLib.jDataDo",
"Json+typeRevision": 0
},
{
"pin": false,
"time": 1504607400 ,
"error": 0,
"Json+typeName": "MkcJsonLib.jDataDi",
"Json+typeRevision": 0
},
],
"Json+typeName": "MkcJsonLib.jData",
"Json+typeRevision": 0
}
jData
This object contains the process name and an array with all the IO configurations.
{
"time": 1504607508,
"entries": {...},
"Json+typeName": "MkcJsonLib.jProcess",
"Json+typeRevision": 0
}
Variable | Description | datatype | writable |
time | time of last change of any IO | integer | no |
entries | array containing all the IO data | array | - |
curl read command example:
curl -H "ApiRdKey: rdKey7" 192.168.15.100/api/v1/data
jDataDi
This object contains the digital input's volatile data.
{
"pin": false,
"time": 1504607400 ,
"error": 0,
"Json+typeName": "MkcJsonLib.jDataDi",
"Json+typeRevision": 0
}
Variable | Description | datatype | writable |
pin | the input's value | boolean | no |
time | input's last change | integer | no |
error | input's error code; 0 = no error | integer | no |
curl read command example:
curl -H "ApiRdKey: rdKey7" 192.168.15.100/api/v1/data/entries/0
This object contains the state of the digital ouput.
jDataDo
{
"pin": true,
"time": 1504607508 ,
"error": 0,
"Json+typeName": "MkcJsonLib.jDataDo",
"Json+typeRevision": 0
}
Variable | Description | datatype | writable |
pin | the current output value | boolean | yes |
time | output's last change | integer | no |
error | output's error code; 0 = no error | integer | no |
curl read command example:
curl -H "ApiRdKey: rdKey7" 192.168.15.100/api/v1/data/entries/1
curl write command example:
curl -H "ApiRdKey: rdKey7" -H "ApiWrKey: wrKey7" -d "pin=true" 192.168.15.100/api/v1/data/entries/1
jDataAi
This object contains the analog input's volatile data.
{
"pin": 347.000,
"time": 1504607505,
"error": 0,
"Json+typeName": "MkcJsonLib.jDataAi",
"Json+typeRevision": 0
}
Variable | Description | datatype | writable |
pin | the input's value | float | no |
time | input's last change | integer | no |
error | input's error code; 0 = no error | integer | no |
curl read command example:
curl -H "ApiRdKey: rdKey7" 192.168.15.100/api/v1/data/entries/2
jDataAo
This object contains the analog input's volatile data.
{
"pin": 0.004,
"time": 1504607504,
"error": 0,
"Json+typeName": "MkcJsonLib.jDataAo",
"Json+typeRevision": 0
}
Variable | Description | datatype | writable |
pin | the input's value | float | yes |
time | input's last change | integer | no |
error | input's error code; 0 = no error | integer | no |
curl read command example:
curl -H "ApiRdKey: rdKey7" 192.168.15.100/api/v1/data/entries/3
curl write command example:
curl -H "ApiRdKey: rdKey7" -H "ApiWrKey: wrKey7" -d "pin=1.5" 192.168.15.100/api/v1/data/entries/3