Reputation: 652
I need to set up two kinds of quotas for my endpoint: - a general quota for any client call the endpoint - a specific quota for a specific client that call my endpoint
From the documentation [https://cloud.google.com/endpoints/docs/openapi/quotas-configure] I can't find how to do this, better: I understand that I can do only the first point, not the second.
The second point must be implemented in my business logic? If yes, any kind of suggestions/best practices to do this?
Thanks in advance
Upvotes: 1
Views: 281
Reputation: 8066
You can control the rate at which applications call you API by setting the quotas on Cloud Endpoints. All the request are tied to the consumer project:
After you configure a quota, Endpoints tracks the number of requests per minute per consumer Google Cloud project. Each application that calls your API must:
Have a Google Cloud project.
Have enabled your API in their Google Cloud project.
Send an API key. with each request to your API. This lets Endpoints identify the Google Cloud project that the calling application is associated with and to increment the request counter for the Google Cloud project.
For information on configuring an API key, see the following:
You can either have your API consumers create their own projects in the Google Cloud Console, or you can create the projects for them. Because Endpoints enforces quotas per project, you must have one project for each API consumer.
Upvotes: 1