Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:mervis-scada:50-api [2023/09/26 14:39]
v.kohout [api/v3/get/history]
en:mervis-scada:50-api [2025/02/27 11:43] (current)
v.kohout [api/get/projectByParts]
Line 249: Line 249:
    * URL: /api/get/history/specific?format=json    * URL: /api/get/history/specific?format=json
    * Method: POST    * Method: POST
-   * You should always use "token" instead of simple "name" "password". Non-token call is slower.+   * You should always use token ("t"instead of simple name and password ("nand "p"). Non-token call is slower.
    * "dataSpec" - data specification    * "dataSpec" - data specification
       MinTimestamp = 0,       MinTimestamp = 0,
Line 272: Line 272:
   "count":1000,   "count":1000,
   "dataSpec":2,    "dataSpec":2, 
-  "refTime":"\/Date(123)\/",+  "refTime":"\/Date(1692788459000)\/",
   "dpIds":["58426e69-46ba-4925-9a5c-d7d65efb9886","f4501a2e-62ed-430e-9346-5e155e730fe3","28e7d087-917a-456a-9d02-96882f572286"]   "dpIds":["58426e69-46ba-4925-9a5c-d7d65efb9886","f4501a2e-62ed-430e-9346-5e155e730fe3","28e7d087-917a-456a-9d02-96882f572286"]
 } }
Line 279: Line 279:
 **Response** **Response**
  
-   * Empty "segmentation" ("requestState") marks response containing last data of the requested series 
-   * "requestState" and "serverState" must be copied to the next API call 
    * Values    * Values
      * v - value      * v - value
      * ts - timestamp - start of the value validity period      * ts - timestamp - start of the value validity period
      * gt - goodthrough - end of the value validity period      * gt - goodthrough - end of the value validity period
-     * i - interval, only present if it differs from the interval in Meta section +     * i - interval
-   * Meta +
-     * type - value type - double, string, datetime +
-     * unit - unit +
-     * interval - expected interval between the stored records. Useful to identify missing data.+
  
 <code javascript> <code javascript>
Line 598: Line 592:
   </actionDefs>   </actionDefs>
 </executeActionsRequest></code> </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>
 +
 +====api/set/values====
 +
 +**Request**
 +
 +   * URL: /api/set/values?format=xml
 +   * Method: POST
 +   * Content-Type: text/xml
 +
 +<code xml>
 +<?xml version="1.0" encoding="UTF-8"?>
 +<setValuesRequest xmlns:r="http://dev.rcware.eu/serialization/references" xmlns="http://dev.rcware.eu/scada/datapoints" xmlns:n2="http://dev.rcware.eu/auth" xmlns:n1="http://dev.rcware.eu/scada/comm-props" >
 +   <n2:cred n="demo" p="demo"/>
 +        <values projId="1b2623be-eaa4-4e29-8596-c66dd85d5643">
 +            <dps>
 +                <d id="07d538d9-9f4b-46ca-ba4d-13b13b5302ff">
 +                    <props>
 +                        <p n="Source" t="2024-02-23T09:58:00Z" r:type="1c104bdf-ffcb-4c90-b491-e4781a91ef09">
 +                            <n1:v>23</n1:v>
 +                        </p>
 +                    </props>
 +                </d>
 +            </dps>
 +        </values>
 +</setValuesRequest></code>
  
 **Response** **Response**
Line 775: Line 799:
  </dps>  </dps>
 </getProjectByPartsResult></code> </getProjectByPartsResult></code>
 +
 +====api/get/projects====
 +
 +To get the list of projects.
 +
 +**Request**
 +
 +   * URL: /api/get/projects?format=xml
 +   * Method: POST
 +
 +<code javascript>
 +{
 + "cred":
 + {
 + "n":"xxx",
 + "p":"xxx"
 + },
 + "offset":0,
 + "count":250
 +}
 +</code>
 +
 +**Response**
 +
 +<code xml><?xml version="1.0" encoding="utf-8"?>
 +<?xml version="1.0" encoding="utf-8"?>
 +<getProjectsResult xmlns:r="http://dev.rcware.eu/serialization/references" xmlns:n1="http://dev.rcware.eu/loc" xmlns:n2="http://dev.rcware.eu/scada/notifications" xmlns:n3="http://dev.rcware.eu/scada/schemas" xmlns:n4="http://dev.rcware.eu/projectMetadata" dataVersion="638761649652581521" xmlns="http://dev.rcware.eu/scada/projects">
 +    <projects>
 +        <project id="00000000-3333-0000-0000-000001000001" name="P0001" domain="PP_Domain_0001" tz="Europe/Prague">
 +            <loc>
 +                <n1:gps lat="0" lon="0" />
 +            </loc>
 +            <mdi>
 +                <mi n2:moduleInstantiated="true" r:type="073d1b6c-24f5-435a-a5bd-1d54e04b0d06" r:def="1" />
 +                <mi n3:totalAllowedSchemasCount="1" n3:totalSchemasCount="1" r:type="aa8818ce-d47d-41ff-9be5-3de9f34d7ebf" />
 +            </mdi>
 +        </project>
 +        <project id="03cd3dd9-e170-4799-bc26-17ac0eccf780" name="aaa" domain="DomainTes1" tz="Europe/Prague">
 +            <mdi>
 +                <mi r:ref="1" r:type="073d1b6c-24f5-435a-a5bd-1d54e04b0d06" />
 +                <mi r:type="1fe100d2-2dbe-4737-bb10-7cf2a19123b2">
 +                    <n3:schemas />
 +                    <n3:schemaGroups />
 +                    <n3:slideShow />
 +                </mi>
 +            </mdi>
 +        </project>
 +    </projects>
 +</getProjectsResult>
 +</code>
 ===== Matlab Client ===== ===== Matlab Client =====
 ==== General notes client function parameters ==== ==== General notes client function parameters ====
  • © Energocentrum Plus, s.r.o. 2017 - 2025