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

Home

 
4D v20 R7
Get license info

Get license info 


 

Get license info -> Function result 
Parameter Type   Description
Function result  Object in Information about the active licence

The Get license info command returns an object providing detailed information about the active license.

If the command is executed on a 4D application that does not use locally a license (e.g. 4D remote), the command returns a Null object.

The returned object contains the following properties:

{
    "name": string
    "licenseNumber": string
    "version": string
    "attributes": optional, array of strings
    "userName": string
    "userMail": string
    "companyName": string
    "platforms": array of strings
    "expirationDate": optional, object
    "renewalFailureCount": optional, number
    "products":[ //for each registered expansion product
        {
            "id": number
            "name": string
            "usedCount": number
            "allowedCount": number
            "rights": [
                {
                    "count": number
                    "expirationDate" optional, object
                }
            ]
        }
    ]
}

PropertyTypeDescriptionExample
namestringCommercial name"4D Developer Professional v16"
licenseNumberstringLicense number"4DDP16XXXXX1123456789"
versionstringProduct version number"16", "16R2"
attributescollection of stringsLicense type(s) when applicable (optional)["application","OEM"]
userNamestringName of 4D store account"John Smith"
userMailstringMail of 4D store account"john.smith@gmail.com"
companyNamestringCompany name of 4D store account"Alpha Cie"
platformscollection of stringsLicense platform(s)["macOS", "windows"]
expirationDateobjectDate of expiration (optional){"day":2, "month":6, "year":2018}
renewalFailureCountnumberNumber of unsuccessful automatic renewal attempts for at least one of the product licenses (optional)3
productscollection of objectsDescription of product license (one element per product license)
[ ].idnumberLicense numberFor available values, see the Is license available command
[ ].namestringLicense name"4D Write - 4D Write Pro"
[ ].usedCountnumberNumber of consumed connections8
[ ].allowedCountnumberTotal connections allowed for the product against the expiry dates15
[ ].rightscollection of objectsRights for the product (one element per expiration date)
[ ].countnumberNumber of allowed connections15 (32767 means unlimited)
[ ].expirationDateobjectDate of expiration (optional, same format as above){"day":1, "month":11, "year":2017}

Example  

You want to get information on your current 4D Server license:

 C_OBJECT($obj)
 $obj:=Get license info

$obj can contain, for example:

{
    "name": "4D Server v16 R3",
    "licenseNumber": "xxxx",
    "version": "16R3",
    "userName": "John DOE",
    "userMail": "john.doe@alpha.com",
    "companyName": "Alpha",
    "platforms": ["macOS", "windows"],
    "expirationDate": {"day":1, "month":1, "year":2018},
    "products":[
        {
            "allowedCount": 15,
            "id": 808464697,
            "name": "4D Write - 4D Write Pro",
            "rights": [
                {
                    "count": 5,
                    "expirationDate": {"day":1, "month":2, "year":2018}
                }, {
                    "count": 10,
                    "expirationDate": {"day":1, "month":11, "year":2017}
                }, {
                    "count": 10,
                    "expirationDate": {"day":1, "month":11, "year":2015} //expired, not counted
                }
            ],
            "usedCount": 12
        },
        {...}
    ]
}



See also 

CHANGE LICENSES
Is license available
WEB Get server info

 
PROPERTIES 

Product: 4D
Theme: Licenses
Number: 1489

This command can be run in preemptive processesDifferent in remote mode

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v16 R4
Modified: 4D v16 R6

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)