cli: add org quota-usage command (getOrgQuotaUsage API)#302
Merged
Conversation
Adds support for the GET /quota_usage/{oid} endpoint (getOrgQuotaUsage),
exposing the enforced sensor quota usage the platform uses to gate sensors
coming online. Unlike the online sensor count, this weights EPP/response-mode
sensors, so it can read higher and is the correct value to size the sensor
quota against.
- SDK: Organization.get_quota_usage() returns {usage, quota, breakdown}
- CLI: `limacharlie org quota-usage` with --ai-help explain text
- Docs + unit tests (SDK, CLI, command-map lint, subcommand regression)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds CLI + SDK support for the new
getOrgQuotaUsageAPI (GET /quota_usage/{oid}).This endpoint returns the enforced sensor quota usage — the weighted virtual-sensor count the platform actually uses to decide whether a sensor may come online. Unlike the
/onlinecount (which weights EPP/response-mode sensors at 0), this is the value to sizesensor_quotaagainst, and it can read higher than the online count.Response shape:
{ "usage": int, "quota": int, "breakdown": { <category>: { "n": int, "quota": float } } }.Changes
Organization.get_quota_usage()(limacharlie/sdk/organization.py)limacharlie org quota-usage, with--ai-helpexplain text (limacharlie/commands/org.py)doc/cli/platform-admin.mdTesting
pytestpasses for all org/quota/lint tests. The pre-existing failures intest_search_checkpoint_cli.py/test_search_output.pyare date-dependent and present on the basecli-v2branch, unrelated to this change.🤖 Generated with Claude Code