Skip to main content

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.

SettingRequiredDefaultDescription
DATABASE__HOSTRequiredlocalhostHost name or IP address of the database server.
DATABASE__PORTRequired5432Port of the database server. Set to 1433 for a standard SQL Server installation.
DATABASE__NAMERequiredpostgresName of the Analytics database.
DATABASE__USERNAMERequiredpostgresUser with read access to the Analytics database.
DATABASE__PASSWORDRequired(empty)Password for the user. Avoid the characters @ : / # ? %, since they can break the connection.
DATABASE__ENCRYPTyesEncrypt the connection: yes or no. Keep yes.
DATABASE__TRUST_SERVER_CERTIFICATEyesAccept the server certificate without validating it: yes or no. Set to no if the database server has a certificate your server trusts.
DATABASE__POOL_SIZE10Number of database connections kept open.
DATABASE__MAX_OVERFLOW20Extra connections allowed when all pooled connections are in use.
DATABASE__POOL_TIMEOUT30Seconds to wait for a free connection before a request fails.
DATABASE__POOL_RECYCLE1800Seconds 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_report and main_report_summary in /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.

SettingRequiredDefaultDescription
AUTHENTICATION__API_KEYRequiredapiThe API key clients must send. Choose a long, random value. The default is not safe.
AUTHENTICATION__API_KEY_HEADERRecommendedx-api-keyName 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.

SettingRequiredDefaultDescription
APP__ROOT_PATH/Only needed if your reverse proxy serves the API under a path prefix, for example /analytics.
APP__HEALTH_CHECKS_ENABLEDtrueEnables /v1/healthz, which checks the connection to the database.
SECURITY__CORS__ENABLEDtrueAllow 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.

SettingRequiredDefaultDescription
LOG__LEVELINFODEBUG, INFO, WARNING, ERROR or CRITICAL.
LOG__CONSOLE__ENABLEDtrueWrite logs to the console.
LOG__CONSOLE__FORMATplainplain or json. Use json if you collect logs with a log system.
LOG__FILE__ENABLEDtrueWrite logs to files in LOG__PATH.
LOG__PATH/app/logsFolder for log files in the container.
LOG__FILE__FILENAMEservice.logName of the log file.
LOG__FILE__MAX_SIZE10485760Maximum size of a log file in bytes (10 MB) before a new file is started.
LOG__FILE__MAX_FILES15Number of log files kept.
OTEL_METRICS_EXPORTERotlpnone turns off metrics export. Set it to none unless you collect metrics with an OpenTelemetry collector, otherwise the logs repeat OTLP telemetry endpoint unreachable.