Get Events
This method will retrieve events that were registered using Register event method.
Events are stored for at least 30 days. Older events may be removed.
Parameters
This method is accessed by https://api.cryptolens.io/api/ai/GetEvents
Parameter |
Description |
Remarks |
Limit |
Specifies how many events should be returned.
|
default is 10 and at most 100 |
StartingAfter |
Works as a cursor (for pagination). If the last element had the id=125, then
setting this to 125 will return all events coming after 125.
|
optional |
EndingBefore |
Works as a cursor (for pagination). If the last element had the id=125, then
setting this to 125 will return all events coming before 125.
|
optional |
Time |
The time value to filter the events on. This can either be a Unix timestamp or
a dictionary with the following properties:
- gte - returns events where "Time" is greater than or equal to this value.
- gt - returns events where "Time" is greater than this value.
- lte - returns events where "Time" is less than or equal to this value.
- lt - returns events where "Time" is less than this value.
For example, if you call this method with a GET request, you could set it to {"gte":1534407953,"lte":1534422362}
to filter between events created at 1534407953 and 1534422362.
|
optional |
ProductId |
The product id to filter on.
|
optional |
Key |
The key string to filter on. Note: to filter on a license key, you need to specify the ProductId parameter.
|
optional |
Metadata |
The metadata string to filter on.
|
optional |
v |
Method version. |
optional. by default, it's 1. |
Results
Parameter |
Description |
Remarks |
Events |
A list of Event 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.
If it's a successful result, null will be returned.
Otherwise, in case of an error, a short message will be returned describing the error.
|
always returned. |
Example results
{"result":0,"message":""}
Errors
Error |
Access denied. |
The input parameters were incorrect. |
The 'Time' parameter has the wrong format. |