Skip to main content
Version: 20 R7 BETA

License usage

License usage : Collection

ParameterTypeDescription
Function resultCollectionA collection of objects with information on the retained licenses.

Description

The License usage command returns a collection of objects containing information on the retained licenses.

Each object in the returned collection has the following attributes:

Property nameTypeDescription
productIdNumberID of the license type
productNameTextName of the license type
productUsedCountNumberNumber of retained licenses (including this one) when the license was retained
productBalanceNumberNumber of remaining licenses for the product (just after the action)
globalProductUsedCountNumberWhen several servers are running on the same machine, shows the retained count for all of them
tokenNumberOperation's unique ID
timeTextTimestamp that indicates when the license was retained, in ISO 8601 format
reasonTextThe reason/caller of this license usage
sessionObjectContains specific information about the retained license's session

Depending on the type of session (4D client or REST for example), the contents of the session object in the above table will vary. See below for details.

session object for 4D client sessions

Inside the returned collection for 4D sessions, each element contains a session object identical to the one returned by the Process activity command:

Property nameTypeDescription
typeText (enum)Session type. Possible values: "remote", "storedProcedure", "web", "rest"
userNameTextUser name
machineNameTextName of the remote machine
systemUserNameTextName of the system session opened on the remote machine
IPAddressTextIP address of the remote machine
hostTypeText (enum)Host type. Possible values: "windows", "mac", "browser"
creationDateTimeDate ISO 8601Date and time of connection of the remote machine
stateText (enum)Session state. Possible values: "active", "postponed", "sleeping"
IDTextSession UUID
persistentIDTextSession's persistent ID

session object for SQL sessions

This table details the contents of the session object for SQL sessions:

Property nameTypeDescription
IPAddressTextIP address of the session
userAgentTextUser Agent
userNameTextUser Name
userIdNumberUser ID

session object for REST sessions

This table details the contents of the session object for REST sessions:

Property nameTypeDescription
userNameTextUser Name
sessionIDTextREST session ID
IPAddressTextID of the client that initiated the REST session
isDatastoreBooleanTrue if the REST request comes from a datastore