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 revisionBoth sides next revision
access_via_api [2019/06/07 14:27] – [Getting current registers values] akuzmukaccess_via_api [2019/06/07 14:29] akuzmuk
Line 624: Line 624:
 To obtain entries from the register register, you must perform follwing GET request on a URL http://192.168.1.1/api/register-log. To obtain entries from the register register, you must perform follwing GET request on a URL http://192.168.1.1/api/register-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-REG-IDS header. For example:+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:
  
   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-REG-IDS: 8,10+  X-WH-REGISTERS: 8,10
      
 Also, in the headers, you must specify the desired data exchange format. Currently, only the JSONformat is supported. Also, in the headers, you must specify the desired data exchange format. Currently, only the JSONformat is supported.
Line 648: Line 648:
   X-WH-START: 1422595501   X-WH-START: 1422595501
   X-WH-END: 1422599101   X-WH-END: 1422599101
-  X-WH-REG-IDS: 8,10+  X-WH-REGISTERS: 8,10
  
 Reply example: Reply example:
Line 1300: Line 1300:
 To get data from graph log, it is necessary to run following GET-query for URL http://192.168.1.1/api/graph-data/2. Here 2 - is the ID of the graph of interest. To get data from graph log, it is necessary to run following GET-query for URL http://192.168.1.1/api/graph-data/2. Here 2 - is the ID of the graph of interest.
  
-Also, instead of specifying the graph ID, you can send the X-WH-REGS header. It specifies, through the comma, the ID of the registers for which data is to be extracted. Example:+Also, instead of specifying the graph ID, you can send the X-WH-REGISTERS header. It specifies, through the comma, the ID of the registers for which data is to be extracted. Example:
  
-  X-WH-REGS: 23,12,4+  X-WH-REGISTERS: 23,12,4
  
 In the request headers, you must pass the API key, the boundaries of the time interval of interest (X-WH-START, X-WH-END) and the number of values ​​(X-WH-SLICES). X-WH-START and X-WH-END are transmitted in UnixTime format. For example: In the request headers, you must pass the API key, the boundaries of the time interval of interest (X-WH-START, X-WH-END) and the number of values ​​(X-WH-SLICES). X-WH-START and X-WH-END are transmitted in UnixTime format. For 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