Skip to main content
Version: 20 R7 BETA

WEB Get server info

WEB Get server info {( withCache )} : Object

ParameterTypeDescription
withCacheBooleanTrue to return the Web cache description. Otherwise (default), the cache description is not returned.
Function resultObjectInformation on the running Web server and SOAP server

Description

The WEB Get server info command returns an object containing detailed runtine information on the 4D Web server current session. Returned information include the SOAP server.

Note: This command returns runtime information, i.e. actual parameters used by the Web server. These parameters can differ from those returned by the WEB GET OPTION command since they depend on system settings, available resources, etc.

By default, the command does not return the "cache" property, since it can be a very large. However, if you want to know the cache contents, pass True in the withCache optional parameter.

The returned object contains the following properties (property names are case sensitive):

PropertyValue typeDescription
startedBooleanTrue if the http server is started, False otherwise
uptimeNumberTime elapsed since last startup of the http server
httpRequestCountNumberNumber of http hits received by the server since it was started
startModeText"automatic" if “Launch Web Server at Startup" is checked, otherwise "manual".
SOAPServerStartedBooleanTrue if the SOAP server is started, False otherwise
cacheObjectThis property is included only if the withCache parameter is True. Describes the contents of the web server cache (see cache property below)
securityObjectCurrent status of the various security options
cipherSuiteTextCipher list used by 4D for the secure protocol (corresponds to the SSL cipher list database parameter)
HTTPEnabledBooleanTrue if HTTP is enabled
HTTPSEnabledBooleanTrue if HTTPS is enabled
HSTSEnabledBooleanTrue if HSTS is activated on the server
HSTSMaxAgeNumberMaximum age (in seconds) for HSTS. The default is 2 years (63,072,000 seconds).
minTLSVersionTextMinimum TLS version accepted for connections (corresponds to the Min TLS version database parameter)
openSSLVersionTextVersion of the used OpenSSL library
perfectForwardSecrecyBooleanTrue if PFS is available on the server, False otherwise
optionsObjectCurrent status of various standard web server options
CORSEnabledBooleanTrue if the CORS service is enabled on the server, False otherwise (default)
CORSSettingsCollectionCollection of CORS objects defining the list of allowed host(s) and method(s) (see Web CORS settings web option)
webCharacterSetTextCharacter set name (corresponds to the Web character set web option)
webHTTPCompressionLevelNumberCompression level for compressed HTTP exchanges (corresponds to the Web HTTP compression level web option)
webHTTPCompressionThresholdNumberCompression threshold (corresponds to the Web HTTP compression threshold web option)
webHTTPSPortIDNumberTCP port number used by the Web server for secure connections (corresponds to the Web HTTPS port ID web option)
webInactiveProcessTimeoutNumberNot significant in scalable web sessions mode, see Web Sessions Management (Legacy). Life duration of the inactive session processes (corresponds to the Web inactive process timeout web option)
webInactiveSessionTimeoutNumberNot significant in scalable web sessions mode, see Web Sessions Management (Legacy). Life duration of the inactive sessions (corresponds to the Web inactive session timeout web option)
webIPAddressToListenCollectionIP address(e) in the defined "format" on which the web server receives http requests (corresponds to the Web IP address to listen web option)
webMaxConcurrentProcessesNumberNot significant in scalable web sessions mode, see Web Sessions Management (Legacy). Maximum number of concurrent web processes (corresponds to the Web max concurrent processes web option)
webPortIDNumberTCP port used by the Web server (corresponds to the Web port ID web option)

4D Server: The command returns information about the local Web server. If you want to monitor the 4D Server web server from a remote 4D, you need to apply the "Execute on server" property to the method.

cache property

If you pass true in the withCache parameter, the command returns the "cache" object property with the following contents:

Property nameValue typeDescription
cacheUsageNumberCache usage rate
numOfLoadsNumberNumber of loaded objects
currentSizeNumberCache current size
maxSizeNumberCache maximum size
objectMaxSizeNumberMaximum size of objects loadable in the cache
enabledBooleantrue if the web server cache is enabled
nbCachedObjectsNumberNumber of objects in the cache
cachedObjectsCollectionCollection of objects in the cache. Each cached object is defined by different properties (url, mimeType, expirationType, lastModified, etc.)

Example

After you execute the following code:

 $webServerInfo:=WEB Get server info(True)

... $webServerInfo will contain for example:

{
"started": true,
"uptime": 40,
"SOAPServerStarted": true,
"startMode": "manual",
"httpRequestCount": 0,
"options": {
"CORSEnabled": false,
"CORSSettings": null,
"webCharacterSet": "UTF-8",
"webHTTPCompressionLevel": 1,
"webHTTPCompressionThreshold": 1024,
"webHTTPSPortID": 443,
"webIPAddressToListen": ["192.168.xxx.xxx"],
"webInactiveProcessTimeout": 28800,
"webInactiveSessionTimeout": 28800,
"webMaxConcurrentProcesses": 100,
"webPortID": 80
},
"security": {
"HTTPEnabled": true,
"cipherSuite": "ECDHE-RSA-AES128-GCM-SHA256:...:CAMELLIA128-SHA",
"openSSLVersion": "OpenSSL 1.0.2h 3 May 2016",
"perfectForwardSecrecy": true,
"minTLSVersion": "1.2"
},
"cache": {
"cacheUsage": 1,
"numOfLoads": 24,
"currentSize": 154219,
"maxSize": 10485760,
"objectMaxSize": 524288,
"enabled": true,
"nbCachedObjects": 23,
"cachedObjects": [
{ ... },
{ ... }
]
}
}

See also

License info
Process activity
SOAP REJECT NEW REQUESTS

Properties

Command number1531
Thread safe