Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
en:mervis-scada:50-api [2020/04/27 12:45] m.chlupac [api/set/history] |
en:mervis-scada:50-api [2021/04/15 10:43] m.chlupac |
||
---|---|---|---|
Line 40: | Line 40: | ||
* URL: / | * URL: / | ||
* Method: POST | * Method: POST | ||
- | |||
- | **Request** | ||
<code javascript> | <code javascript> | ||
Line 56: | Line 54: | ||
* You **should** use the received token **t** in subsequent API calls. | * You **should** use the received token **t** in subsequent API calls. | ||
- | ====api/ | + | |
+ | |||
+ | ==== api/ | ||
+ | |||
+ | **Request** | ||
+ | |||
+ | * URL: / | ||
+ | * Method: POST | ||
+ | * Downloading of one or multiple trends with single API call | ||
+ | * You should always use " | ||
+ | * " | ||
+ | * " | ||
+ | * Items: " | ||
+ | |||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **Response** | ||
+ | |||
+ | * Empty " | ||
+ | * " | ||
+ | * Values | ||
+ | * v - value | ||
+ | * ts - timestamp - start 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 | ||
+ | * Meta | ||
+ | * type - value type - double, string, datetime | ||
+ | * unit - unit | ||
+ | * interval - expected interval between the stored records. Useful to identify missing data. | ||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | **Demo** | ||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== [Depricated] | ||
**Request** | **Request** | ||
Line 188: | Line 375: | ||
* URL: / | * URL: / | ||
* Method: POST | * Method: POST | ||
+ | * Content-Type: | ||
<code xml> | <code xml> | ||
Line 267: | Line 455: | ||
</ | </ | ||
+ | ====api/ | ||
+ | To get the list of datapoints. | ||
+ | |||
+ | **Request** | ||
+ | |||
+ | * URL: / | ||
+ | * Method: POST | ||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **Response** | ||
+ | |||
+ | <code xml><? | ||
+ | < | ||
+ | < | ||
+ | <dp id=" | ||
+ | < | ||
+ | < | ||
+ | <p n=" | ||
+ | <n1:r n2: | ||
+ | < | ||
+ | </ | ||
+ | <n1:w r: | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | <p n=" | ||
+ | < | ||
+ | </ | ||
+ | <p n=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <n3:p r: | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | </dp> | ||
+ | <dp id=" | ||
+ | < | ||
+ | < | ||
+ | <p n=" | ||
+ | <n1:r n2: | ||
+ | < | ||
+ | </ | ||
+ | <n1:w r: | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | <p n=" | ||
+ | < | ||
+ | </ | ||
+ | <p n=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <n3:p r: | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | <def enabled=" | ||
+ | < | ||
+ | <status user=" | ||
+ | </ | ||
+ | </dp> | ||
+ | </ | ||
+ | </ | ||
===== Matlab Client ===== | ===== Matlab Client ===== | ||
==== General notes client function parameters ==== | ==== General notes client function parameters ==== |