Is there a MGMT API call to gather Quota information for a particular app?

What we need is an API which can return the Quota information for each app that developer creates.

This information needs to be displayed on the Developer Portal.

Solved Solved
2 1 87
1 ACCEPTED SOLUTION

Quota is a parameter that gets set on the API Product entity. You can retrieve the product details, sample call is below.

curl -X GET "https://api.enterprise.apigee.com/v1/organizations/org_name/apiproducts/<<apiproduct_name>>"

The result is like this:

{
  "apiResources" : [ ],
  "approvalType" : "auto",
  "attributes" : [ {
    "name" : "access",
    "value" : "public"
  } ],
  "createdAt" : 1441735180966,
  "createdBy" : "someone@apigee.com",
  "description" : "",
  "displayName" : "NameOfProductHere",
  "environments" : [ "test", "prod" ],
  "lastModifiedAt" : 1441735180966,
  "lastModifiedBy" : "someone@apigee.com",
  "name" : "NameOfProductHere",
  "proxies" : [ "apiproxy1", "apiproxy2" ],
  "quota" : "200",
  "quotaInterval" : "1",
  "quotaTimeUnit" : "minute",
  "scopes" : [ "" ]
}

You'd have to display this bit of metadata in the developer portal.

Also, FYI, the quota information is displayed in the Management UI.

Hope it helps.

View solution in original post

1 REPLY 1

Quota is a parameter that gets set on the API Product entity. You can retrieve the product details, sample call is below.

curl -X GET "https://api.enterprise.apigee.com/v1/organizations/org_name/apiproducts/<<apiproduct_name>>"

The result is like this:

{
  "apiResources" : [ ],
  "approvalType" : "auto",
  "attributes" : [ {
    "name" : "access",
    "value" : "public"
  } ],
  "createdAt" : 1441735180966,
  "createdBy" : "someone@apigee.com",
  "description" : "",
  "displayName" : "NameOfProductHere",
  "environments" : [ "test", "prod" ],
  "lastModifiedAt" : 1441735180966,
  "lastModifiedBy" : "someone@apigee.com",
  "name" : "NameOfProductHere",
  "proxies" : [ "apiproxy1", "apiproxy2" ],
  "quota" : "200",
  "quotaInterval" : "1",
  "quotaTimeUnit" : "minute",
  "scopes" : [ "" ]
}

You'd have to display this bit of metadata in the developer portal.

Also, FYI, the quota information is displayed in the Management UI.

Hope it helps.