Tells if the current request is executed as a part of REST API call
Returns true if current request is executed via REST API, returns false otherwise.
In this example we will show you how to implement a very basic rate limiting for your REST API. We would assume that limit is set as number of requests per user per month and users table has two additional fields: ratelimitquota (the current number of requests) and ratelimit (the max allowed number of requests). The following code goes to AfterSuccessfulLogin event.