access_via_api
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
access_via_api [2021/03/24 16:10] – atolstov | access_via_api [2022/01/26 10:03] – atolstov | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP center round tip 60%> | ||
+ | |||
+ | |||
====== Using API ====== | ====== Using API ====== | ||
Line 26: | Line 29: | ||
<WRAP center round important 60%> | <WRAP center round important 60%> | ||
- | Note that, if you are for using another WebHMI as client, the following line should be removed | + | Note that, if you are using another WebHMI as client |
Accept-Encoding: | Accept-Encoding: | ||
</ | </ | ||
Line 523: | Line 526: | ||
} | } | ||
</ | </ | ||
+ | ==== Register' | ||
^ Register' | ^ Register' | ||
|**id**| int | Unique register id | | |**id**| int | Unique register id | | ||
Line 614: | Line 617: | ||
|3|Double Word | | |3|Double Word | | ||
|4|Unix Time | | |4|Unix Time | | ||
+ | |5|String | | ||
+ | |||
^Storage formats identifiers: | ^Storage formats identifiers: | ||
Line 1243: | Line 1248: | ||
|min_val |double |Minimal value of the Y axis| | |min_val |double |Minimal value of the Y axis| | ||
|max_val |double |Maximal value of the Y axis| | |max_val |double |Maximal value of the Y axis| | ||
+ | |||
+ | ===== Alert list ===== | ||
+ | |||
+ | To get a list of all alerts, you must perform a GET request on the URL like this: http:// | ||
+ | |||
+ | To obtain information about a particular alert, you must perform a following GET request on a URL ' | ||
+ | |||
+ | In the headers, it is necessary to pass API key. For example: | ||
+ | |||
+ | X-WH-APIKEY: | ||
+ | | ||
+ | Also, in the headers, you must specify the desired data exchange format. Currently, only the JSON format is supported. | ||
+ | |||
+ | Accept: application/ | ||
+ | Content-Type: | ||
+ | |||
+ | Example of query for the full graph list: | ||
+ | |||
+ | ***URL:** http:// | ||
+ | ***Method: | ||
+ | *Headers: | ||
+ | |||
+ | Accept: application/ | ||
+ | Content-Type: | ||
+ | Accept-Encoding: | ||
+ | X-WH-APIKEY: | ||
+ | |||
+ | Reply example: | ||
+ | < | ||
+ | [ | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | </ | ||
+ | |||
+ | <WRAP center round info 60%> | ||
+ | To get information about currently active alerts, you can use [[current_alerts? | ||
+ | </ | ||
+ | |||
+ | |||
===== Image list ===== | ===== Image list ===== | ||
Line 2265: | Line 2334: | ||
The %%//%% are comments, they are absent in the real reponse. | The %%//%% are comments, they are absent in the real reponse. | ||
+ | ====== API usage examples ====== | ||
+ | |||
+ | * [[example_of_data_access_from_excel_via_api|Data access from Excel]] | ||
+ | * [[example_of_data_access_from_c_c|Data access from C/C++]] | ||
+ | * [[google_sheet_api_example|Data access from the Google Sheets]] | ||
+ | * [[Android demo application]] | ||
+ | * [[Android application via Chrome]] | ||
access_via_api.txt · Last modified: 2023/03/02 10:53 by emozolyak