Replies: 4 comments 2 replies
-
@jugaadi, what kind of information would you like to capture for rate limits? Rate limits are often set to a particular category of consumers, i.e., a basic subscription may consume 100/day, whereas a gold subscription is allowed to consume 10.000/day. There is an API and additionally different service levels for the API. Adding rate limits is adding service level into the API contract. Would you like to add different service levels for the API or per operation? |
Beta Was this translation helpful? Give feedback.
-
RateLimit header fields for HTTP allow conveying rate limits at runtime, and make the OpenAPI description independent of the user's (employer's) current subscription / service plan / ... |
Beta Was this translation helpful? Give feedback.
-
See the SLA4OAI extension work. Especially the ratesObject |
Beta Was this translation helpful? Give feedback.
-
I consider rate limits to be a non-functional entitlement that is more aligned with the social contract than the technical contract. Some of your API customers may have access to APIs (functionality) that aren't available to everyone (like an API restricted to trusted partners), and that would require documentation of those distinct technical contracts/entitlements. But if the functional contract is identical yet the usage limits/quotas vary by user, should the OpenAPI document reflect those various non-functional entitlements? It gets too complicated to couple the social contract into the technical contract, IMO. |
Beta Was this translation helpful? Give feedback.
-
Since API Rate limits just like AuthN also come under the API contract, it would be beneficial for a developer to define it in the API description itself. Most API vendors use different strategies for limiting excessing API usage. Therefore, a provision to define the strategy/scheme and the rate limits per operation(or at content-type level) would be really helpful. This would also help clients(generated or otherwise) to consume resources efficiently.
Beta Was this translation helpful? Give feedback.
All reactions