Use this tutorial to check your organization’s total allowance for a meter, usage for the current cycle, and reset date.
You’ll work with the Rovo credits meter in this tutorial. You’ll also use the meter’s pay-as-you-go settings to work out whether your organization has a limit and, if so, how much usage remains before reaching it.
For more details on meters and usage, see What is Platform usage?
For full technical details of available operations, see the meters API.
This tutorial does not cover:
You need all of the following:
| Placeholder | Replace it with |
|---|---|
{orgId} | Your organization ID |
{meterId} | The ID of the Rovo credits meter (see Find the Rovo credits meter ID) |
<api_key> | Your organization API key |
An API token is not an API key.
Authorization: Bearer <api_key>.This tutorial uses an organization API key as a Bearer token.
Keep the API key out of source code and version control.
payAsYouGo.enabled and payAsYouGo.limit values for later in this tutorial. You can read the summary even if limits.supported is false.You can get your organization summary with the operation:
GET /admin/v1/orgs/{orgId}/meters/{meterId}/summary
1 2 3 4 5curl --request GET \ --url "https://api.atlassian.com/admin/v1/orgs/{orgId}/meters/{meterId}/summary" \ --header "Authorization: Bearer <api_key>" \ --header "Accept: application/json"
{orgId}, {meterId}, and <api_key>.GET request.A successful request returns 200. For example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14{ "data": { "allowance": { "total": 100000, "included": 80000, "committedPacks": 20000 }, "usage": { "total": 51000 }, "resetDate": "2027-01-04T00:00:00Z" } }
Use this table to interpret the response to your GET request.
| Response | Meaning | What to do |
|---|---|---|
200 | The request worked. The response shows your organization's allowance, usage, and reset date. | Continue to the next step. |
404 with meter-not-found | The meter is not provisioned for the organization or has been deactivated. | Check {meterId} and use an active meter for your organization. |
429 | The organization has sent too many requests. | Wait for the time in the X-Retry-After header, then retry. |
500 with internal-error | An unexpected error occurred. | Retry later. If it keeps happening, contact support. |
503 with service-unavailable | The request couldn't be served right now. | Wait for a short time before retrying. |
This step provides a description of the summary. For more details on how your organization’s allowance works, see Manage usage limits for Rovo credits.
Successful responses wrap their content in a data object, and the field names below are relative to it.
allowance.total is the total allowance for the cycle. It’s calculated by adding allowance.included to allowance.committedPacks.allowance.included is the monthly allowance from the subscriptions and any usage packs. Usage packs are not shown separately.allowance.committedPacks is the allowance from committed packs that are active today, which means today is within the pack's term. It displays 0 if no committed packs are active.usage.total is what the whole organization has used in the current cycle, including accounts with and without individual limits and any usage above the allowance.resetDate is the date and time when usage resets. It displays null when the date isn't known.Use the meter’s payAsYouGo settings from Step 1 and the organization summary from Step 2 to calculate your organization’s limit.
payAsYouGo.enabled | payAsYouGo.limit | Organization limit | Remaining usage |
|---|---|---|---|
false | null | allowance.total | Organization limit minus usage.total |
true | 0 | allowance.total, the same as when pay as you go is disabled | Organization limit minus usage.total |
true | A number greater than 0 | allowance.total plus payAsYouGo.limit | Organization limit minus usage.total |
true | null | No organization limit. Atlassian system limits still apply | Not applicable |
If pay as you go is disabled, the example summary in Step 2 gives an organization limit of 100,000 credits. Usage is 51,000 credits, so 49,000 credits remain before the organization reaches its limit.
For more examples and details, see the meters API documentation.
Rate this page: