Legacy REST API
caution
We strongly recommend using the up-to-date REST API, for which we provide support and documentation.
1. Intro
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 Configuration Interface, 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:
Parameter | Value |
---|---|
Authorization | Basic Auth |
Username | operator or manufacturer |
Password | operator/manufacturer password |
Content Type | application/json |
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
To access the | |
---|---|
Rest interface documentation | enable Enable REST interface in Operator Page |
Rest Protocol in full state for all key/value pairs | access via this URL: http://rest/full_state |
Rest Protocol in individual state for particular key/value pairs | access via this URL schema: http://controller_ip/rest/<KEY> |
Example
To access conn_state
, replace KEY
with conn_state
- Schema:
http://rest/<KEY>
- Schema applied to get
conn_state
:http://rest/conn_state