API for Quota reset

Not applicable

Hi Experts,

The quota configuration on product level is giving us a really hard time. I am aware of Reset Quota policy. However, I don't want it to be a part of any specific API working on any specific set of conditions etc. Is it possible to make an API to call this policy and then reset the Quota of a developer? Can anyone pls guide me on how to do that?

Regards,

Salman

1 3 433
3 REPLIES 3

Not applicable

@Anil Sagar any comments on this? I'd really appreciate your support.

Regards,

Salman

It is pretty common to build a "management" API that can reset quotas, flush caches etc. The basic idea would be to create a special endpoint that uses just the reset quota policy, but then limit it to some specially authorized users. The structure might look like this:

https://your-org-server/v1/management/quotareset/<quota-identifier>;

  1. Verify OAuth Token (or API key) to ensure the user has rights to execute management service
  2. reset quota using the quota identifier (which could be by developer or any other quota classification).

Does this make sense?

@Paul Williams thanks for your comments. I have been trying a few thing for the past few days and this was one of them. I did create an API which would ask for OAuth Token and then get Quota information. However, I am facing below mentioned problems:

  • The new reset quota API made needs to be part of a product to be verified by OAuth Token
  • How do I pass some other developers data to this API so it can fetch and reset the Quota?
  • My API is getting the data of the developer who is calling this API and then resets it. Also for this I need to add this API to the same product for which I want to reset the quota of the developer. Which doesn't make sense.

Looking forward to your comments on this.

Regards,

Salman