Obě strany předchozí revize
Předchozí verze
Následující verze
|
Předchozí verze
Následující verze
Obě strany příští revize
|
cs:mervis-scada:50-api [2019/07/10 11:37] m.chlupac |
cs:mervis-scada:50-api [2020/04/06 12:29] v.kohout |
**Request** | **Request** |
| |
* URL: /api/checkCredentials?format=xml | * URL: https://scada.mervis.info/api/checkCredentials?format=xml |
* Method: POST | * Method: POST |
| |
<checkCredentialsResult xmlns:r="http://dev.rcware.eu/serialization/references" d="GlobalDomain" l="demo" t="2:85be00d3-5875-4dec-a9b4-c98e2ff2acbe" xmlns="http://dev.rcware.eu/auth" /> | <checkCredentialsResult xmlns:r="http://dev.rcware.eu/serialization/references" d="GlobalDomain" l="demo" t="2:85be00d3-5875-4dec-a9b4-c98e2ff2acbe" xmlns="http://dev.rcware.eu/auth" /> |
</code> | </code> |
| |
| * Získaný token **t** lze použít místo dvojice jméno/heslo v následujících API voláních. |
| |
====api/get/history==== | ====api/get/history==== |
</code> | </code> |
| |
| ====api/set/history==== |
| |
| **Request** |
| |
| * URL: /api/set/history?format=xml |
| * Method: POST |
| |
| <code xml> |
| <?xml version="1.0" encoding="UTF-8"?> |
| <setHistoryRequest xmlns="http://dev.rcware.eu/scada/history" |
| xmlns:n2="http://dev.rcware.eu/auth" |
| xmlns:n1="http://dev.rcware.eu/scada/basic-props" |
| projId="5abf8ca0-94ba-48df-8d3c-7ebe87a12fd0" |
| dpId="e86dba6d-1250-4e7f-aafb-84fd28324710"> |
| <n2:cred n="userName" p="password"/> |
| <vals> |
| <hv ts="2020-03-15T11:00:00+00:00" i="P1D"> |
| <n1:v>2.7</n1:v> |
| </hv> |
| <hv ts="2020-03-16T11:00:00+00:00" i="P1D"> |
| <n1:v>3.0</n1:v> |
| </hv> |
| <hv ts="2020-03-17T11:00:00+00:00" i="P1D"> |
| <n1:v>2.0</n1:v> |
| </hv> |
| <hv ts="2020-03-18T11:00:00+00:00" i="P1D"> |
| <n1:v>2.3</n1:v> |
| </hv> |
| </vals> |
| </setHistoryRequest></code> |
| |
| **Response** |
| |
| * 200 OK |
| |
| ====api/set/executeActions==== |
| |
| **Request** |
| |
| * URL: /api/set/executeActions?format=xml |
| * Method: POST |
| |
| <code xml> |
| <?xml version="1.0" encoding="UTF-8"?> |
| <executeActionsRequest xmlns="http://dev.rcware.eu/scada/action-defs" |
| xmlns:n2="http://dev.rcware.eu/scada/basic-props" |
| xmlns:n1="http://dev.rcware.eu/auth" |
| xmlns:r="http://dev.rcware.eu/serialization/references"> |
| <n1:cred n="userName" p="password"/> |
| <actionDefs projId="5abf8ca0-94ba-48df-8d3c-7ebe87a12fd0"> |
| <actions> |
| <actionDefItem propName="INIT" dpId="afc22e18-f8e4-4e08-899c-fb9e4759df3d"> |
| <execParam r:type="495c9644-eed1-4b94-933b-3fae702a9aca"> |
| <n2:value>16</n2:value> |
| </execParam> |
| </actionDefItem> |
| <actionDefItem propName="ZAP" dpId="34306c80-73f1-4465-ab51-2b2c1e85ab70"> |
| </actionDefItem> |
| </actions> |
| </actionDefs> |
| </executeActionsRequest></code> |
| |
| **Response** |
| |
| <code xml><?xml version="1.0" encoding="utf-8"?> |
| <executeActionsResponse xmlns:r="http://dev.rcware.eu/serialization/references" code="Ok" message="OK" xmlns="http://dev.rcware.eu/scada/error-reporting" /></code> |
| |