User Tools

Site Tools


access_via_api

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
access_via_api [2020/04/07 11:57] – [Getting meters log] emozolyakaccess_via_api [2020/12/08 13:50] – [Getting data for events] emozolyak
Line 1624: Line 1624:
   Content-Type: application/json   Content-Type: application/json
      
-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 chapter for more information
- +
-{{::api_ev_1_example.png?direct}} +
- +
-{{::api_ev_1_example_actions.png?direct}} +
- +
-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.  +
- +
-{{::api_ev_child_1.png?direct}} +
- +
-{{::api_ev_child_2.png?direct}} +
- +
-{{::api_ev_child_3.png?direct}}+
  
 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://192.168.1.1/api/meters-log. To obtain entries from the meters log, you must perform follwing GET request on a URL http://192.168.1.1/api/meters-log.
  
-In the request headers, it is necessary to pass the API key, the boundaries of the time interval of interest, and a list of register identifiers. X-WH-START and X-WH-END are transmitted in UnixTime format. The register ID is passed by a comma-separated list in the X-WH-REGISTERS header. For example:+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. All meter registers will be returned, so X-WH-REGISTER header is omitted. For example:
  
   X-WH-APIKEY: F3C74230818DA487BB2017CE5D0290F4DABCAFD7   X-WH-APIKEY: F3C74230818DA487BB2017CE5D0290F4DABCAFD7
   X-WH-START: 1422595501   X-WH-START: 1422595501
   X-WH-END: 1422599101   X-WH-END: 1422599101
-  X-WH-REGISTERS: 65 
- 
      
 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: 65  
  
 Reply example: Reply example:
access_via_api.txt · Last modified: 2023/03/02 10:53 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki