This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
Get license usage

Get license usage 


 

Get license usage -> Function result 
Parameter Type   Description
Function result  Collection in A collection of objects with information on the retained licenses.

The Get 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.

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

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

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

 
PROPERTIES 

Product: 4D
Theme: Licenses
Number: 1782

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v19 R4

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)