New command to get Web Server information

This feature is another way of providing you the ability to create your own server administration dialog. Following the ability to retrieve information for all processes (added in 4D v16 R4), we are now offering you a new command which returns, as a whole, all runtime information about 4D Web server.

With 4D v16 R5, retrieving web server information has never been easier, thanks to a single command: WEB Get server info.

The WEB Get server info command has an optional input parameter:

result:= WEB Get server info ( { withCacheInfo } )

This parameter allows you to define whether you want to get information about the web server cache in the cache attribute, otherwise this attribute will be undefined.

Note: the cache information is very detailed, so it could be quite large. This is why the default setting for  withCacheInfo parameter is ‘false’.

Code Example

If I execute the following code on a 4D client in a method with the Execute on server property set:

C_OBJECT($obj)
$obj:=WEB Get server info

The $obj object returned by the command will contain the information as shown below. In this example, the web server has been running for 40 seconds on port 80, the SOAP server is started, TLS is enabled and its minimum version is 1.2,…

{
   "started": true,
   "uptime": 40,
   "SOAPServerStarted": true,
   "startMode": "manual",
   "httpRequestCount": 0,
   "options": {
      "webCharacterSet": "UTF-8",
      "webHTTPCompressionLevel": 1,
      "webHTTPCompressionThreshold": 1024,
      "webHTTPSPortID": 443,
      "webIPAddressToListen": ["192.168.xxx.xxx"],
      "webInactiveProcessTimeout": 28800,
      "webInactiveSessionTimeout": 28800,
      "webMaxConcurrentProcesses": 100,
      "webPortID": 80
   },
   "security": {
      "TLSEnabled": true,
      "cipherSuite": "ECDHE-RSA-AES128-GCM-SHA256:...:CAMELLIA128-SHA",
      "openSSLVersion": "OpenSSL 1.0.2h 3 May 2016",
      "minTLSVersion": "1.2" 
   }
}
Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.