Skip to main content

axesFlip REST Server configuration guide

Version: 1.1.37

This guide details the available configuration settings for the axesFlip REST Server application, which uses a standard JSON format for its configuration file (flip.config.json).

To use the application, create a configuration file named flip.config.json tailored to your environment and place it in the same directory as axesflip.exe

The download package includes example configuration files that you can use as a starting point or adapt to your needs:

  • example-flip.config.json
  • minimal-example-flip.config.json

Table of contents

Overview

The configuration file is typically loaded by the application at startup. The settings define logging behavior, web server endpoints (Kestrel), API behaviors, CORS policies, and template locations.

Configuration structure

The configuration file uses a nested JSON structure. Keys represent configuration sections and individual settings.

Configuration sections

Logging

Configures standard console and system logging levels for different application namespaces.

Field Name Data Type Description
Logging.EnableConsoleLogging Boolean If set to true, logging output is sent to the console (e.g., standard output/error streams).
Logging.LogLevel.* String Specifies the minimum severity level to log for specific namespaces (A4.*, Default, System, Microsoft).

FileLog

Configures the application's dedicated file-based logging mechanism. This is independent of the standard Logging section.

Field Name Data Type Description
FileLog.Enabled Boolean Enables or disables logging output to a file.
FileLog.Path String The base directory where log files will be stored. Examples, for linux /var/log/axesFlip or windows LocalAppData
FileLog.Folder String A sub-folder within Path to organize logs.
FileLog.FileName String The base name of the log file.
FileLog.MaxFileSizeMb Integer Maximum size a single log file can reach before rotation occurs, in Megabytes.
FileLog.MaxFiles Integer The maximum number of rotated log files to keep before older ones are deleted.
FileLog.LogLevel String The minimum severity level for file logging (Info, Warning, Error, etc.).

Kestrel (web server)

Configures the Kestrel web server endpoints and SSL certificates.

  • For Linux: If running Kestrel directly, configure the file path to your PFX certificate and its password.
  • For Windows: Configure settings to load the certificate directly from the Windows Certificate Trust Store.

For more information, check the Kestrel documentation.

Field Name Data Type Description
Kestrel.EndPoints.Http.Url String The URL and port the server listens on (e.g., https://*:29375 binds to all interfaces on port 29375 using HTTPS).
Kestrel.EndPoints.Http.Certificate.Path String Linux (File): The file path to the SSL certificate file.
Kestrel.EndPoints.Http.Certificate.Password String Linux (File): The password required to access the certificate file. Note: This should be secured via environment variables in production.
Kestrel:Endpoints:Https:Certificate:Subject String Windows (Store): The subject name of the certificate to find in the store (e.g., CN=yourdomain.com).
Kestrel:Endpoints:Https:Certificate:Store String Windows (Store): The certificate store name (commonly My for personal certificates).
Kestrel:Endpoints:Https:Certificate:Location String Windows (Store): The store location (CurrentUser or LocalMachine).
Kestrel:Endpoints:Https:Certificate:AllowInvalid Boolean Windows (Store): Allows use of invalid certificates (e.g., self-signed); use only for development/testing.

Cors

Field Name Data Type Description
Cors.AllowedOrigins Array of Strings

A list of origins (domains, protocols, ports) that are allowed to make cross-origin requests to this API. Uses * for wildcards.

Default: *

Swagger (API documentation)

Field Name Data Type Description
Swagger.Enabled Boolean

If true, the Swagger UI endpoints are exposed relative to the configured host URL (e.g., http://localhost:5000/swagger).

Default: true

RestApi settings

Field Name Data Type Default Value Description
RestApi.MaxRequestBodySizeMb Integer 25

Maximum size (in MB) allowed for incoming HTTP request bodies.

Default: 25

RestApi.CheckRequestBodySize Boolean true

Enables/Disables the check for MaxRequestBodySizeMb. If false, the limit is effectively ignored.

Default: false

Template settings

Field Name Data Type Description
Template.BaseTemplatePath String The root directory where templates are stored.
Template.Templates Array of Objects A collection of pre-configured templates.
Template:Templates:Id String A unique identifier for a specific pre-configured template.
Template:Templates:Status String The current operational status of the pre-configured template.
Template:Templates:TemplatePath String The path to the pre-configured template file.

Root-level settings

Field Name Data Type Description
Environment String The application's runtime environment (e.g., "Development", "Staging", "Production").
If "Production" is set, a valid license is strictly required.
LicenseFilePath String The file path to the license file.

Complete configuration example

{
  "Logging": {
    "LogLevel": {
      "A4.Flip.Clients.Api": "Information",
      "A4.*": "Warning",
      "Default": "Warning",
      "System": "Error",
      "Microsoft": "Error"
    },
    "EnableConsoleLogging": false
  },
  "FileLog": {
    "Enabled": true,
    "Path": "/var/log/axesFlip",
    "Folder": "axes4",
    "FileName": "flipWebServer.log",
    "MaxFileSizeMb": 10,
    "MaxFiles": 10,
    "LogLevel": "Info"
  },
  "Kestrel": {
    "EndPoints": {
      "Http": {
        "Url": "https://*:29375",
        "Certificate": {
          "Path": "/etc/ssl/certs/mycert.pem",
          "Password": "pwd"
        }
      }
    }
  },
  "Cors": {
    "AllowedOrigins": ["https://*:29375"]
  },
  "Swagger": {
    "Enabled": true
  },
  "AllowedHosts": "*",
  "RestApi": {
    "MaxRequestBodySizeMb": 40,
    "CheckRequestBodySize": false
  },
  "Template": {
    "BaseTemplatePath": "./Store/Templates",
    "Templates": [
      {
        "Id": "sample",
        "Status": "Active",
        "TemplatePath": "../../sample.json"
      },
      {
        "Id": "demo",
        "Status": "Active",
        "TemplatePath": "path/to/template.json"
      }
    ]
  },
  "Environment": "Development",
  "LicenseFilePath": "./path/to/license/file"
}

Minimal configuration example

{
  "Logging": {
    "LogLevel": {
		"Default": "Information"
    },
    "EnableConsoleLogging": true
  },
  "Kestrel": {
    "Endpoints": {
      "Http": {
        "Url": "http://localhost:29375",
      }
    }
  },
  "Cors": {
    "AllowedOrigins": [ "http://localhost:29375"]
  },
  "AllowedHosts": "*",
  "Template": {
    "BaseTemplatePath": "Templates",
  }
}