Configuration - Analytics API v1.4.13
(Last updated: 2026-10-12, Created: 2026-09-29)
Analytics API is configured with environment variables, set in .env.api with Docker, or in .env with the Windows installation (see Installation).
This page applies to v1.3.2 up to and including v1.4.13, which use the same settings.
Legend: Required must be set. Recommended has a default, but most installations should set it.
Database
The Analytics database that Analytics Data Processing writes to.
| Setting | Required | Default | Description |
|---|---|---|---|
DATABASE__HOST | Required | localhost | Host name or IP address of the database server. |
DATABASE__PORT | Required | 5432 | Port of the database server. Set to 1433 for a standard SQL Server installation. |
DATABASE__NAME | Required | postgres | Name of the Analytics database. |
DATABASE__USERNAME | Required | postgres | User with read access to the Analytics database. |
DATABASE__PASSWORD | Required | (empty) | Password for the user. Avoid the characters @ : / # ? %, since they can break the connection. |
DATABASE__ENCRYPT | yes | Encrypt the connection: yes or no. Keep yes. | |
DATABASE__TRUST_SERVER_CERTIFICATE | yes | Accept the server certificate without validating it: yes or no. Set to no if the database server has a certificate your server trusts. | |
DATABASE__POOL_SIZE | 10 | Number of database connections kept open. | |
DATABASE__MAX_OVERFLOW | 20 | Extra connections allowed when all pooled connections are in use. | |
DATABASE__POOL_TIMEOUT | 30 | Seconds to wait for a free connection before a request fails. | |
DATABASE__POOL_RECYCLE | 1800 | Seconds before a connection is replaced. |
Authentication
Every request must include the API key in the configured header. Only /v1/ping, /v1/healthz and opening the GraphiQL page in a browser work without it. Queries run from GraphiQL still need the key.
Some endpoints are built for EWA Insight, and are not meant for your own integrations. They follow the needs of EWA Insight, and can change between versions:
main_reportandmain_report_summaryin/serve/graphql./lookups/graphql.GET /v1/reports/main-report/export.
The CSV export also checks the header BLIKSUND-X-API-KEY, whatever AUTHENTICATION__API_KEY_HEADER is set to. Set AUTHENTICATION__API_KEY_HEADER to BLIKSUND-X-API-KEY, so one header works for every endpoint.
| Setting | Required | Default | Description |
|---|---|---|---|
AUTHENTICATION__API_KEY | Required | api | The API key clients must send. Choose a long, random value. The default is not safe. |
AUTHENTICATION__API_KEY_HEADER | Recommended | x-api-key | Name of the header that carries the API key. Set it to BLIKSUND-X-API-KEY, as in the examples in this documentation. |
Web server
In Docker, the API listens on port 9090 inside the container. Choose the port on the server in docker-compose.ewa_analytics.yml, see Ports. As a Windows service, the API listens on 127.0.0.1:9090.
| Setting | Required | Default | Description |
|---|---|---|---|
APP__ROOT_PATH | / | Only needed if your reverse proxy serves the API under a path prefix, for example /analytics. | |
APP__HEALTH_CHECKS_ENABLED | true | Enables /v1/healthz, which checks the connection to the database. | |
SECURITY__CORS__ENABLED | true | Allow calls from web pages on other domains, limited to the origins below. | |
SECURITY__CORS__ALLOW_ORIGINS | ["http://localhost:3000"] | Web page origins allowed to call the API, as a JSON list. Only relevant if a web page in a browser calls the API directly. |
Logging
Logs are written to the console (see them with docker compose logs) and to files in /app/logs in the container. With the Docker installation, that folder is logs next to the compose file. For the Windows installation, see Logging.
| Setting | Required | Default | Description |
|---|---|---|---|
LOG__LEVEL | INFO | DEBUG, INFO, WARNING, ERROR or CRITICAL. | |
LOG__CONSOLE__ENABLED | true | Write logs to the console. | |
LOG__CONSOLE__FORMAT | plain | plain or json. Use json if you collect logs with a log system. | |
LOG__FILE__ENABLED | true | Write logs to files in LOG__PATH. | |
LOG__PATH | /app/logs | Folder for log files in the container. | |
LOG__FILE__FILENAME | service.log | Name of the log file. | |
LOG__FILE__MAX_SIZE | 10485760 | Maximum size of a log file in bytes (10 MB) before a new file is started. | |
LOG__FILE__MAX_FILES | 15 | Number of log files kept. | |
OTEL_METRICS_EXPORTER | otlp | none turns off metrics export. Set it to none unless you collect metrics with an OpenTelemetry collector, otherwise the logs repeat OTLP telemetry endpoint unreachable. |