Retrieve the license information by programming

When you perform analysis, reporting or debugging of your server application you may want to know the number of available clients, the number of consumed connections, the expiration date and many other information.

Now with 4D v16 R4, you can retrieve detailed information about the active license of your running 4D product (4D Server for instance). For example:

  • version,
  • platform,
  • number of available and consumed connections for 4D Write Pro,
  • number of available and consumed connections for 4D Client,
  • expiration date,

You just need to call the Get license info new command that returns an object:

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

For example, here is the object returned for a 4D Server license:

{
    "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":[
        {
            // Expansion of 15 4D Write - 4D Write Pro connections
            "allowedCount": 15,
            "id": 808464697,
            "name": "4D Write - 4D Write Pro",
            "rights": [
                {
                    // 5 connections until December 1st, 2017
                    "count": 5,
                    "expirationDate": {"day":1, "month":12, "year":2017}
                }, {
                    // 10 connections until November 1st, 2017 
                    "count": 10,
                    "expirationDate": {"day":1, "month":11, "year":2017}
                }
            ],
            // 12 4D Write - 4D Write Pro licenses currently used
            "usedCount": 12
        },
        {...}
    ]
}
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.