Toto je starší verze dokumentu!
API
Mervis SCADA nabízí otevřené REST-like API postavené na JSON a XML formátech dat. Pro kompletní popis API kontaktujte naši technickou podporu.
Přehled základních API metod
Function | Description |
---|
api/checkCredentials | |
---|---|
api/logout | |
api/get/projects | |
api/get/projectData | |
api/get/projectByParts | |
api/get/history | |
api/get/history/specific | |
api/set/history | |
api/get/values | |
api/get/alarms | |
api/get/alarmHistory | |
api/get/eventHistory | |
api/get/changes | |
api/set/executeActions | |
api/set/values | |
api/set/executeAlarmOps | |
api/set/projectPriorityRefresh | |
api/get/schema | |
api/get/schema/datapoints | |
api/get/schema/values | |
api/get/schema/image |
Příklad
api/get/history
Request
- URL: /api/get/history?format=xml
- Method: POST
{ "cred":{ "t":"d1871589-c455-416a-91f3-d9cda3aa5e0f" }, "projId":"2e4deb05-0517-4ef7-ae7a-02e146b23a1d", "dpId":"ffb370fc-eeb8-404f-9088-46577ea64134", "providerId":"689E32FA-24A2-448E-9374-6158E6E6CB15", "from":"/Date(1494280800000)/", //UTC, Unixtime milliseconds "to":"/Date(1494412488822)/", //UTC, Unixtime milliseconds "offset":0, "count":5000, "historyState":"" }
Response
<getHistoryResult xmlns:r="http://dev.rcware.eu/serialization/references" r:type="b133774d-21ce-42b6-add3-57c012079c55" xmlns:n1="http://dev.rcware.eu/scada/basic-props" xmlns="http://dev.rcware.eu/scada/history"> <hist projId="2e4deb05-0517-4ef7-ae7a-02e146b23a1d" dpId="ffb370fc-eeb8-404f-9088-46577ea64134" propName="Output" interval="PT5M" historyState="" nextValOfs="-1"> <errMsg/> <vals> <hv ts="2017-05-08T22:26:53.32684Z" gt="2017-05-08T22:31:53.465467Z"> <n1:v>4.3</n1:v> </hv> <hv ts="2017-05-08T22:36:53.283875Z"> <n1:v>4.2</n1:v> </hv> <hv ts="2017-05-08T22:41:53.435042Z"> <n1:v>4.1</n1:v> </hv> <hv ts="2017-05-08T22:46:53.711496Z" gt="2017-05-08T23:36:53.776657Z"> <n1:v>4</n1:v> </hv> </vals> </hist> </getHistoryResult>