Get Daily Aggregates

This method retrieves daily aggregate Web API log metrics for one or more products. It returns one Daily Aggregate object per product and day.

Parameters

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

Parameter Description Remarks
Limit Specifies how many aggregate records 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. optional
Start Only return aggregate records on or after this date. optional, format yyyy-MM-dd
End Only return aggregate records on or before 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
Aggregates A list of Daily Aggregate 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

{"aggregates":[{"id":123,"productId":3349,"date":"2026-05-25","totalRequestsLogged":120,"successful":110,"failed":10,"activeDevices":18,"activeKeys":12,"activeCustomers":6}],"result":0,"message":null}

Remarks

  • Usage analytics are updated asynchronously, so very recent activity may not appear immediately.
  • Daily aggregates exclude license keys configured to be excluded from usage analytics. See the KPI dashboard guide for details about excluding test licenses.
  • ActiveKeys and ActiveDevices count keys and machine codes whose activity overlaps the date.
  • The Start and End filters are inclusive.
  • If the access token is locked to a product, only aggregate records for that product can be returned.

Errors

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