Legacy REST API
caution
While still supported, this API is deprecated and we strongly recommend using the up-to-date REST API, for which we provide support and documentation.
1. Introduction
The following explains how to use the REST API to retrieve Charge Controller information.
info
- In order to use the REST interface, it must first be enabled in the Operator Settings under "REST interface".
- The REST API can currently only be used to read out ("read-only") the parameters.
2. Enabling the Legacy REST API
In the Config UI, under SYSTEM / General set REST interface
to Enabled (without UID)
.
3. REST API over HTTP
3.1. HTTP header parameters
Use the following HTTP header parameters for queries:
3.2. Example requests
You can get the Charge Controller's state via the REST API.
With the following GET request you can retrieve the status with an existing USB connection:
curl -XGET -H 'Authorization: Basic Auth' -H 'Username: operator' -H 'Password: your_password' -H "Content-type: application/json" 'http://192.168.123.123/rest/full_state'
4. Rest protocol key names and values
Example
To access conn_state
, replace KEY
with conn_state
- Schema:
http://rest/<KEY>
- Schema applied to get
conn_state
:http://rest/conn_state