[PATCH] Add rate limit support to API