Skip to content
Sylwester Lachiewicz edited this page Aug 1, 2023 · 13 revisions

Log File Location

You can change the log file configuration defined in log4j2.xml:

  • You can change the log directory. The default location is $HOME/logs/steve.log. A more suitable location might be /var/log/steve/steve.log (remember to set directory permissions accordingly)
  • You can change the log level
  • You can change the $HOME directory at startup with: java -Duser.home=/another/path, in this case the default log file would be /another/path/logs/steve.log.

Gzip compression

As default, gzip is enabled to return compressed content. But, if you are running SteVe behind a proxy (like NGINX) that is already handling your compression, you should disable it in SteVe.

Multiple interfaces

If your server has multiple network interfaces, using 0.0.0.0 as the [server host] (https://github.com/steve-community/steve/blob/master/src/main/resources/config/prod/main.properties#L22) will make the application listen to all interfaces. But this might have security implications.

HTTPS

The basic building blocks to use HTTPS with SteVe are already there. You should enable it in the properties file and change the port if you wish. The main part is the keystore path and password, which have to be set. Java Keystore is a "store" that can hold private keys, certificates, etc. You should create one using the Java Keytool. Here is one tutorial: https://www.digitalocean.com/community/tutorials/java-keytool-essentials-working-with-java-keystores

REST APIs

The functionality of some of the Web UIs is offered as REST APIs as well. In order to expose them, you need to set an API key and value for your environment (prod is just an example). The header must be set as follows in the exemplary HTTP call (12345 is the webapi.value):

Examples:

Retrieve a list of all RFID-Tags:

curl -H "STEVE-API-KEY: 12345" http://localhost:8080/steve/api/v1/ocppTags

Retrieve all transactions of Tag "tag007"

curl -H "STEVE-API-KEY: 12345" http://localhost:8080/steve/api/v1/transactions?ocppIdTag=tag007

Retrieve a list of all transactions in January 2023

curl -H "STEVE-API-KEY: 12345" "http://localhost:8080/steve/api/v1/transactions?from=2023-01-01T00:00:00&to=2023-02-01T00:00:00&periodType=FROM_TO"

The OpenAPI 3 schema can be retrieved at /manager/v3/api-docs of a running steve instance. The file is not meant to be human-readable. You can copy/paste its contents to https://editor.swagger.io/ in order to browse the endpoints and their specifications.