Skip to content

Server Code Configuration

DeclanBuckley edited this page May 28, 2024 · 76 revisions

Home / Configuration / Server Code

How to configure and customise the Server Interface.

Link to the original Server Configuration Settings: Server Code Original Configuration - .NET Framework 4.7.2.



The Server configuration is stored and managed under the **Server Tier**.
Configuration item Description
API_FIREBASE_ENABLED
API_FIREBASE_APP_NAME
API_FIREBASE_SALSA
API_EMAIL_ENABLED EMAIL - MAIL - Switch on [TRUE] or off [FALSE] the Email service
API_EMAIL_MAIL-NOREPLY EMAIL - MAIL - NoReply email address
API_EMAIL_MAIL_SENDER EMAIL - MAIL - Sender email address
API_EMAIL_SMTP_SERVER EMAIL - SMTP - Server IP address
API_EMAIL_SMTP_PORT EMAIL - SMTP - Port number
API_EMAIL_SMTP_AUTHENTICATION EMAIL - SMTP - Switch on [TRUE] or off [FALSE] the authentication
API_EMAIL_SMTP_USERNAME
API_EMAIL_SMTP_PASSWORD EMAIL - SMTP - Set the Password if authentication is required
API_EMAIL_SMTP_SSL EMAIL - SMTP - Switch on [TRUE] or off [FALSE] the SSL
API_EMAIL_DATETIME_MASK EMAIL - TEMPLATE - Datetime Mask
API_RECAPTCHA_PRIVATE_KEY ReCAPTCHA - Private Key
API_RECAPTCHA_URL ReCAPTCHA - URL
API_RECAPTCHA_ENABLED ReCAPTCHA - Switch on [TRUE] or off [FALSE] the ReCaptcha
API_AD_DOMAIN Active Directory - Domain
API_AD_PATH Active Directory - Path
API_AD_USERNAME Active Directory - Username
API_AD_PASSWORD Active Directory - Password
API_AD_CUSTOM_PROPERTIES Active Directory - Custom Properties (comas separated, case sensitive)
API_MASK_PARAMETERS
API_JSONRPC_MASK_PARAMETERS API - JSONRPC - Mask parameters (comas separated, case insensitive)
API_AUTHENTICATION_TYPE API - Windows Authentication [ANONYMOUS, WINDOWS, ANY]
API_STATELESS API - Stateless [TRUE, FALSE]
API_SUCCESS API - Success response (case sensitive)
API_SESSION_COOKIE API - Session Cookie (case sensitive)
API_RESOURCE_I18N_DIRECTORY
API_ADO_DB_CONNECTION_TYPE
API_ADO_DB_AD_DOMAIN
API_ADO_DB_AD_CONNECTION_USERNAME
API_ADO_DB_AD_CONNECTION_PASSWORD
API_FIREBASE_CREDENTIAL
API_FIREBASE_PATH
API_AD_CONNECTION Base query for OpenAD Ldap query
API_AD_QUERY_FILTER Filter for AD Ldap query
API_AD_BLACKLIST_OUS Blacklist of Organisational Units for AD
API_TRACE_ENABLED
API_TRACE_RECORD_IP

REPLACE WITH DETAILS FROM TABLE

last values in table for firebase,server,client and json. FirebaseKey.json, config.global.json etc..

SELECT DISTINCT [API_KEY] ,[API_DESCRIPTION]

FROM [pxstat.net.dev].[dbo].[TS_API_SETTING]

Configuration item Description Type
bulkcopy-tranche-multiplier For database loading, the number of data item sets loaded in each tranche Integer
px Px object Object
px.confidential-value The string to represent a confidential or empty data point String
px.default-units The string to represent an unknown unit String
analytic Analytic object Object
analytic.read-os-item-limit When listing Operating Systems in Analytics, show any number more than this as "Other" Integer
analytic.read-browser-item-limit When listing Browsers in Analytics, show any number more than this as "Other" Integer
analytic.read-referrer-item-limit When listing Referrers in Analytics, show any number more than this as "Other" Integer
analytic.referrer-not-applicable Abbreviation for "Not Applicable" String
search.search-word-multiplier Search weighting for search terms. A higher number will result in a higher score when a search term is found. Int
search.synonym-multiplier Search weighting for synonyms of search terms. A higher number will result in a higher score when a synonym of a search term is found. Int
subscription.query-threshold The maximum number of queries a subscriber can save(default = 1000) Integer

There is a reduced web.config file at https://github.com/CSOIreland/PxStat/server/build/PxStat.

Settings from the original web.config file now appear in the appSettings.json file.

The appsettings.json file entries are listed below:

  "Blocked_Requests": null,
  "API_Config": {
    "version": null,
    "API_MAINTENANCE": false,
    "Settings_Type": "DB",
    "API_TRACE_ENABLED": false,
    "API_TRACE_RECORD_IP": false
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "Log4NetCore": {
    "Log4NetConfigFileName": "log4net.config"
  },
  "APP_Config": {
    "version": null,
    "Settings_Type": "DB",
    "enabled": true
  },
  "API_SETTINGS": {
    "JSONRPC": {
      "allowed": true,
      "verb": [ "GET", "POST" ]
    },
    "RESTFUL": {
      "allowed": true,
      "verb": [ "GET", "POST", "HEAD" ]
    },
    "STATIC": {
      "allowed": true,
      "verb": [ "GET", "POST" ]
    }
  },

  "ConnectionStrings": {
    "DefaultConnection": "Integrated Security=true;Server=10.7.4.41;Initial Catalog=pxstat.net.dev;Persist Security Info=False;Column Encryption Setting=enabled;TrustServerCertificate=True"
  },
  "ADOSettings": {
    "API_ADO_DEFAULT_CONNECTION": "DefaultConnection",
    "API_PERFORMANCE_DATABASE": "DefaultConnection",
    "API_TRACE_DATABASE": "DefaultConnection",
    "API_ADO_EXECUTION_TIMEOUT": 3600,
    "API_ADO_BULKCOPY_TIMEOUT": 3600,
    "API_ADO_BULKCOPY_BATCHSIZE": 4999,
    "API_DATABASE_TRACE_ENABLED": false
  },
  "APIPerformanceSettings": {
    "API_PERFORMANCE_ENABLED": false
  },
  "CacheSettings": {
    "API_MEMCACHED_SALSA": "apd_test3",
    "API_MEMCACHED_MAX_VALIDITY": "2592000",
    "API_MEMCACHED_MAX_SIZE": "128",
    "API_MEMCACHED_ENABLED": true,
    "API_CACHE_TRACE_ENABLED": false
  },
  "enyimMemcached": {
    "Servers": [
      {
        "Address": "10.7.2.22",
        "Port": 11211
      }
    ],
    "socketPool": {
      "minPoolSize": "5",
      "maxPoolSize": "25",
      "connectionTimeout": "00:00:15",
      "receiveTimeout": "00:00:15",
      "deadTimeout": "00:00:15",
      "queueTimeout": "00:00:00.150"
    }
  },
  "LanguageResource": {
    "languages": [
      {
        "ISO": "en",
        "NAME": "English",
        "PLUGIN_LOCATION": "PxStat\\bin\\net6.0\\PxLanguagePlugin.en.dll",
        "NAMESPACE_CLASS": "PxLanguagePlugin.en.Language",
        "IS_LIVE": true,
        "TRANSLATION_URL": "https://cdn.jsdelivr.net/gh/CSOIreland/PxLanguagePlugins@dff9187/server/src/en/PxLanguagePlugin/Resources/language.json"
      },
      {
        "ISO": "ga",
        "NAME": "Gaeilge",
        "PLUGIN_LOCATION": "PxStat\\bin\\net6.0\\PxLanguagePlugin.ga.dll",
        "NAMESPACE_CLASS": "PxLanguagePlugin.ga.Language",
        "IS_LIVE": true,
        "TRANSLATION_URL": "https://cdn.jsdelivr.net/gh/CSOIreland/PxLanguagePlugins@dff9187/server/src/ga/PxLanguagePlugin/Resources/language.json"
      }
    ]
  }
}
Clone this wiki locally