SDKs
node.js SDK
License File
27min
for more info see https //docs licensespring com/sdks/tutorials/best practices/local license file https //docs licensespring com/sdks/tutorials/best practices/local license file https //docs licensespring com/sdks/python/licensefile https //docs licensespring com/sdks/python/licensefile to load a local license file, create an instance of licensemanager and call the method loadlicense const licensefile = licensemanager loadlicense(); the license class provides an interface for working with the license file methods create offline request file creates an activate offline req or deactivate offline req file for offline activation/deactivation at the specified path createrequestfile(request offlineactivation, offlinepath string) // type declaration for offline activation interface offlineactivation { isactivation boolean; // true for activation, false for deactivation isguardfileenabled boolean; // should a guard file be created guard any // guard file data if required, created using licenseapi createactivationguard(licensekey) data { // license data product string, hardware id string, license key? string, license id? number, username? string, password? string, app ver? string, os ver? string, hostname? string, ip? string, is vm? boolean, vm info? string, mac address? string, variables? { \[key string] boolean | number | string }, }; } get feature data featuredata(featurecode string) productfeature check license status throws an exception if the license is disabled, inactive or expired checklicensestatus() void perform full license check checks license status and saves to local license file check(includeexpiredfeatures boolean = false) promise\<licenseresponse> air gap license activation code for more info see https //docs licensespring com/license entitlements/activation types/air gapped https //docs licensespring com/license entitlements/activation types/air gapped getdeactivationcode(initializationcode string) string deactivateairgap(confirmationcode string) void deactivate license deactivates a license, updates local license file optionally deletes license file deactivate(deletelicense boolean = false) promise\<boolean> local license check performs a local check using the local license file throws an exception if license is not valid localcheck() promise\<true> change password performs password change for user associated to license changepassword(oldpassword string, newpassword string) promise\<boolean> add local consumption adds a license consumption to the local license data addlocalconsumption(consumptions number = 1) add local feature consumption adds a license feature consumption to the local license data addlocalfeatureconsumption(featurecode string, consumptions number = 1) sync license feature consumption sends a feature consumption request to the server and updates local data syncfeatureconsumption(feature { code string, local consumption number }) promise\<boolean> sync license consumptions syncs local consumptions to server syncconsumption(overages number = 1) promise\<boolean> borrow floating license floatingborrow(borrowuntil string, password? string) promise\<boolean> release floating license floatingrelease() promise\<boolean> check feature checks license feature status, throws exception if not active checkfeature(featurecode string) promise\<void> release borrowed feature releasefeature(featurecode string) promise\<void> update offline update local cache from offline license file (at given path ) optionally reset local consumption value updateoffline(path string, resetconsumption boolean) boolean deactivate license offline deactivateoffline(offlinepath string) promise\<void> get product details retrieves product details from server productdetails(includelatestversion boolean = false, includecustomfields boolean = false, includeexpiredfeatures boolean = false) promise\<productdetailsresponse> retrieve product details from local data get productdetailslocal() device variables set custom variables to local data setdevicevariableslocal(variables { \[key string] string|number }, save boolean = true) void send locally stored variables to server, optionally save to license file setdevicevariables(save boolean = false) promise\<void> get the value of a variable from local data getdevicevariablelocal(variable string) get all variables from local data getdevicevariableslocal() get all variables from server getdevicevariables() promise\<devicevariable\[]> getters get allowgracesubscriptionperiod() get allowoverages() get allowunlimitedactivations() get allowunlimitedconsumptions() get borrowuntil() get consumptionperiod() get consumptionreset() get customerinformation() get customfields() get daysremaining() get dayssincelastcheck() get expirydate() get features() get floatingclientid() get floatingenddate() get floatinginusedevices() get floatingtimeout() get graceperiod() get graceperiodhoursremaining() get id() get isairgapped() get isborrowed() get iscontrolledbyfloatingserver() get isdevicetransferallowed() get isdevicetransferlimited() get isexpired() get isfloating() get isfloatingexpired() get isgraceperiod() get isgraceperiodstarted() get ismaintenanceperiodexpired() get issubcriptiongraceperiodstarted() get istrial() get isvalid() get isvalidityperiodexpired() get lastcheck() get lastusage() get licenseactive() get licenseenabled() get licensekey() get licensetype() get licenseuser() get localconsumptions() get maintenancedaysremaining() get maintenanceperiod() get maxactivations() get maxconsumptions() get maxfloatingusers() get maxoverages() get maxtransfers() get metadata() get policyid() get preventvm() get startdate() get subscriptiongraceperiod() get totalconsumptions() get transfercount() get validityperiod() get validitywithgraceperiod()