Get Key Usage Summaries

This method retrieves lifetime usage summaries for license keys. It returns Key Usage Summary objects.

Parameters

This method is accessed by https://api.cryptolens.io/api/ai/GetKeyUsageSummaries

Parameter Description Remarks
Limit Specifies how many summaries should be returned. default is 100 and at most 1000
StartingAfter Works as a forward cursor. If the last result had id=125, setting this to 125 returns results after 125. optional. Results are ordered by Id ascending.
EndingBefore Works as a backward cursor. If the first result had id=125, setting this to 125 returns results before 125. optional. Results are ordered by Id descending. If both cursors are supplied, EndingBefore is used.
ProductId The product id to filter on. Required when filtering by the license key string. optional
KeyId The license key ID to filter on. optional
Key The license key string to filter on. optional, requires ProductId
Start Only return summaries for keys that were last seen on or after this date. optional, format yyyy-MM-dd
End Only return summaries for keys that were first seen before the end of this date. optional, format yyyy-MM-dd
token An access token with Usage Analytics permission. required
v Method version. optional. by default, it's 1.

Results

Parameter Description Remarks
Summaries A list of Key Usage Summary objects. returned if no errors are thrown
Result This is either 0(=success) or 1(=error). always returned
Message The message that provides additional information about the result. always returned.

Example results

{"summaries":[{"id":7,"productId":3349,"keyId":123456,"key":"AAAA-BBBB-CCCC-DDDD","totalRequests":320,"totalSuccessful":300,"totalFailed":20,"firstSeenUtc":1748131200,"lastSeenUtc":1748217600}],"result":0,"message":null}

Remarks

  • Usage analytics are updated asynchronously, so very recent activity may not appear immediately.
  • Summaries are lifetime key-level totals and can include keys excluded from daily overview aggregates.
  • The Key field is empty if the license key no longer exists.
  • If the access token is locked to a key, only that key's usage summary can be returned.
  • If both KeyId and Key are supplied, they must refer to the same license key.

Errors

Error
Access denied.
The input parameters were incorrect.
Could not find the product.
Could not find the key.
The 'Start' parameter has the wrong format.
The 'End' parameter has the wrong format.
;