Get Keys

Please log in to get a personalized configuration!

This method will return a list of keys for a given product. Please keep in mind that although each license key will be of the License Key type, the fields related to signing operations will be left empty. Instead, if you want to get a signed license key (for example, to achieve offline key activation), please use the Activation instead.

This method is accessed by https://api.cryptolens.io/api/product/GetKeys

Parameters

Parameter Description Remarks
ProductId the product id required
Page If there are more than 100 keys, only 99 will be returned on the first page. in order to obtain the remaining licenses, increment this parameter by 1. optional. 1 by default.
OrderBy Specifies the way to order the result. More information is found in Remarks optional. "ID ascending" by default.
SearchQuery Sorts the result so that only the license keys that satisfy the criterion will be displayed. More information. is found in Remarks optional. empty string by default.
v Method version. optional. by default, it's 1.

Results

Parameter Description Remarks
LicenseKeys A list of License Key objects. returned if successful
Returned The number of licenses returned in the request, eg. size of the returned list. always returned
Total The total number of keys available that satisfy the condition. For example, if search query is empty, the total is the number of license keys in the entire product. Otherwise, it's the number of results of that query. By default, only 99 license keys will be returned in a single request. There may still be more license keys, which are obtained by increasing the Page parameter. always returned
PageCount Since not all keys will be returned if the number of them is more than 99, you can increment the Page parameter to list the remaining ones. This value is the limit of the number of pages available (this makes it easier to iterate through all the keys). always returned
Result This is either 0(=success) or 1(=error). always returned
Message The message that provides additional information about the result. If it's a successful result, either null or the new key (if using SKGL) will be returned. Otherwise, in case of an error, a short message will be returned describing the error. always returned.

Example results

{"licenseKey":[{"productId":1234,"id":1,"key":"AAAAA-AAAAA-AAAAA-AAAAA","created":"2015-08-27T00:00:00","expires":"2018-11-03T00:00:00","period":1023,"f1":true,"f2":false,"f3":false,"f4":false,"f5":false,"f6":false,"f7":false,"f8":false,"notes":"this key is used as an example in one of the test cases.","block":false,"globalId":24963,"customer":{"id":3,"name":"Bob","email":"bob@example.com","companyName":"SKM","created":"2015-09-04T16:11:14.453"},"activatedMachines":[{"mid":"5632812","ip":"10.1.1.1","time":"2016-03-25T18:56:34.647"},{"mid":"7632812","ip":"10.1.1.2","time":"2016-04-06T15:05:35.733"},{"mid":"85256631","ip":"10.1.1.5","time":"2016-04-07T22:18:26.673"}],"trialActivation":false,"maxNoOfMachines":10,"allowedMachines":"","dataObjects":[],"signDate":"2016-04-11T09:45:06","signature":null},"returned":99,"total":106,"pageCount":2,"result":0,"message":""]}

Remarks

  • The fields SignDate and Signature will be empty. Please use Activation in order to get each license signed.
  • The order by field has the following structure: fieldName [ascending|descending]. For example, If you want to order by the feature field 1 (F1), you should use F1. If you want it in descending order, please add the descending keywords right after the field, eg. F1 descending. The ascending keyword is the default, hence optional.
  • The search query field accepts the same queries as the search box on the product page. You can read about the format here.
  • The key lock does not have any effect on this method, eg. you will still be able to retrieve all keys even if the key lock is set to a certain key.

Errors

Error
Access denied.
The input parameters were incorrect.
Could not find the product.
The search query causes problems. Please check that it follows the standard: https://help.cryptolens.io/web-interface/linq-search-product
The 'order by' field causes problems. Please check the remarks section for this method.
;