# Available APIs

Below is a short description and request example for each supported API.

The `CurrentState` table is stored in RAM and is optimized for more frequent use.\
&#x20;All other tables are stored directly on the SD card and should be accessed as little as possible.

*All batterX liveX Systems are developed to use the same APIs when possible.*\
*This documentation acts as a collection of all APIs and IDs (data points) used in any of our systems.*\
*However, it should be noted that not all data points are available for all systems.*

*For example, L2 & L3 values are used only on 3-Phase systems, battery SoC only for LiFePO batteries, etc.*

## GET CurrentState

Get the latest solar, battery, grid, input, output measurements, updated every 5 seconds.\
\&#xNAN;*Depending on the components connected to the system, this can contain more than 100 live data points.*

Request Example:\
`http://LIVEX_IP_ADDRESS/api.php?get=currentstate`

## GET History

Get the inverter power measurements such as production, consumption, grid-injection, etc. in a 5-minute resolution.

Request Example:\
`http://LIVEX_IP_ADDRESS/api.php?get=warnings&from=YYYYMMDD`\
`http://LIVEX_IP_ADDRESS/api.php?get=warnings&from=YYYYMMDD&to=YYYYMMDD`

## GET Warnings

Get the latest and historical inverter warnings / faults.

Request Example:\
`http://LIVEX_IP_ADDRESS/api.php?get=warnings&from=YYYYMMDD`\
`http://LIVEX_IP_ADDRESS/api.php?get=warnings&count=N`

## GET Settings

Get all settings that are set on the batterX liveX, including internal inverter parameters.

Request Example:\
`http://LIVEX_IP_ADDRESS/api.php?get=settings`
