Rozdíly
Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
Obě strany předchozí revize Předchozí verze Následující verze | Předchozí verze | ||
cs:mervis-scada:50-api [2020/04/06 13:16] m.chlupac [api/set/history] |
cs:mervis-scada:50-api [2024/05/08 10:42] (aktuální) |
||
---|---|---|---|
Řádek 28: | Řádek 28: | ||
^api/ | ^api/ | ||
^api/ | ^api/ | ||
+ | ^/ | ||
===== Příklad ===== | ===== Příklad ===== | ||
- | ====api/ | + | ==== api/ |
**Request** | **Request** | ||
Řádek 39: | Řádek 40: | ||
* Method: POST | * Method: POST | ||
- | **Request** | ||
<code javascript> | <code javascript> | ||
Řádek 52: | Řádek 52: | ||
</ | </ | ||
- | * Získaný token **t** lze použít místo dvojice jméno/ | + | * Získaný token **t** je třeba |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== api/ | ||
+ | |||
+ | **Request** | ||
+ | |||
+ | * URL: / | ||
+ | * Method: POST | ||
+ | * Umožňuje stahovat historii pro více datových bodů | ||
+ | * V ukázkách je vždy za dvěma lomítky uvedený typ property | ||
+ | * V sekci credentials lze místo " | ||
+ | * " | ||
+ | * " | ||
+ | * položky " | ||
+ | |||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **Response** | ||
+ | |||
+ | * Dokud je v odpovědi v sekci " | ||
+ | * " | ||
+ | * Values | ||
+ | * v - hodnota | ||
+ | * ts - začátek platnosti hodnoty | ||
+ | * gt - konec platnosti hodnoty | ||
+ | * i - interval, pokud je jiný než uvedená hodnota u celé série | ||
+ | * Meta | ||
+ | * type - typ uložených hodnot - double, string, datetime | ||
+ | * unit - jednotky | ||
+ | * interval - informace o periodě, v jaké by měly být hodnoty v databázi uloženy. Slouží k identifikaci chybějících záznamů. | ||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | **Funkční demo** | ||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
- | ====api/ | + | ==== [Deprecated] |
**Request** | **Request** | ||
Řádek 128: | Řádek 321: | ||
</ | </ | ||
+ | |||
====api/ | ====api/ | ||
Řádek 135: | Řádek 329: | ||
* URL: / | * URL: / | ||
* Method: POST | * Method: POST | ||
+ | * Content-Type: | ||
Atribut **i** nastavuje **interval** ([[https:// | Atribut **i** nastavuje **interval** ([[https:// | ||
Řádek 171: | Řádek 366: | ||
====api/ | ====api/ | ||
- | |||
- | **Request** | ||
* URL: / | * URL: / | ||
* Method: POST | * Method: POST | ||
+ | * Content-Type: | ||
+ | |||
+ | ===DoubleValue=== | ||
+ | |||
+ | **Request** | ||
<code xml> | <code xml> | ||
Řádek 183: | Řádek 381: | ||
xmlns: | xmlns: | ||
xmlns: | xmlns: | ||
- | < | + | < |
< | < | ||
< | < | ||
Řádek 201: | Řádek 399: | ||
<code xml><? | <code xml><? | ||
< | < | ||
+ | |||
+ | ===PlanningCalendar=== | ||
+ | |||
+ | * v requestu je atribut " | ||
+ | * pokud je kalendář číslený místo " | ||
+ | |||
+ | **Request** | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | <n1:cred t=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <n2:ch cmd=" | ||
+ | <n2:def start=" | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | **Response** | ||
+ | |||
+ | <code xml><? | ||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====api/ | ||
+ | |||
+ | * URL: / | ||
+ | * Method: POST | ||
+ | |||
+ | ===Output property=== | ||
+ | |||
+ | Nejvhodnější způsob vyčtení aktuálních hodnot datových bodů (property " | ||
+ | |||
+ | **Request** | ||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Response** | ||
+ | |||
+ | <code xml><? | ||
+ | <values xmlns: | ||
+ | < | ||
+ | <v projId=" | ||
+ | < | ||
+ | <d id=" | ||
+ | < | ||
+ | <p n=" | ||
+ | < | ||
+ | </p> | ||
+ | </ | ||
+ | </d> | ||
+ | <d id=" | ||
+ | < | ||
+ | <p n=" | ||
+ | < | ||
+ | </p> | ||
+ | </ | ||
+ | </d> | ||
+ | </ | ||
+ | </v> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===PlanningCalendar property=== | ||
+ | |||
+ | **Request** | ||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Response** | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | <values xmlns: | ||
+ | < | ||
+ | <v projId=" | ||
+ | <dps> | ||
+ | <d id=" | ||
+ | < | ||
+ | <p n=" | ||
+ | <n1:v defaultValue=" | ||
+ | < | ||
+ | <n1:l name=" | ||
+ | < | ||
+ | <n1:e rev=" | ||
+ | <n1:def start=" | ||
+ | </ | ||
+ | <n1:e rev=" | ||
+ | <n1:def start=" | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | <n1:l name=" | ||
+ | < | ||
+ | <n1:e rev=" | ||
+ | <n1:def start=" | ||
+ | </ | ||
+ | <n1:e rev=" | ||
+ | <n1:def start=" | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | <n1:l name=" | ||
+ | < | ||
+ | <n1:e rev=" | ||
+ | <n1:def start=" | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </p> | ||
+ | </ | ||
+ | </d> | ||
+ | </ | ||
+ | </v> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||