access_via_api
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
access_via_api [2020/04/07 11:57] – [Getting meters log] emozolyak | access_via_api [2020/12/08 13:50] – [Getting data for events] emozolyak | ||
---|---|---|---|
Line 1624: | Line 1624: | ||
Content-Type: | Content-Type: | ||
| | ||
- | Consider an example of two events. Event number 1 is the parent event. It starts on the 5th second of every minute and ends on the 40th second of every minute. The log records data once for the entire event. The time of the beginning of the event and the last value of the interval register I60 are recorded in the log. Screenshots illustrate the setting of this event. | + | Please refer for events |
- | + | ||
- | {{:: | + | |
- | + | ||
- | {{:: | + | |
- | + | ||
- | The second event is the child event for the first event. Therefore, it can only be executed when the first event is executed. In addition, the condition is limited so that it starts at the 25th second of every minute and ends at the 35th. Data for it is written to the log every 2 seconds. The current value of the I60 register is written to the log. Screenshots illustrate the setting of this event. | + | |
- | + | ||
- | {{:: | + | |
- | + | ||
- | {{:: | + | |
- | + | ||
- | {{:: | + | |
Example of getting date about event #1: | Example of getting date about event #1: | ||
Line 2214: | Line 2202: | ||
To obtain entries from the meters log, you must perform follwing GET request on a URL http:// | To obtain entries from the meters log, you must perform follwing GET request on a URL http:// | ||
- | In the request headers, it is necessary to pass the API key, the boundaries of the time interval of interest, | + | In the request headers, it is necessary to pass the API key, the boundaries of the time interval of interest, X-WH-START and X-WH-END are transmitted in UnixTime format. |
X-WH-APIKEY: | X-WH-APIKEY: | ||
X-WH-START: 1422595501 | X-WH-START: 1422595501 | ||
X-WH-END: 1422599101 | X-WH-END: 1422599101 | ||
- | X-WH-REGISTERS: | ||
- | |||
| | ||
Also, in the headers, you must specify the desired data exchange format. Currently, only the JSON format is supported. | Also, in the headers, you must specify the desired data exchange format. Currently, only the JSON format is supported. | ||
Line 2239: | Line 2225: | ||
X-WH-START: 1422595501 | X-WH-START: 1422595501 | ||
X-WH-END: 1422599101 | X-WH-END: 1422599101 | ||
- | X-WH-REGISTERS: | ||
Reply example: | Reply example: |
access_via_api.txt · Last modified: 2023/03/02 10:53 by emozolyak