Skip to content

cli: add org quota-usage command (getOrgQuotaUsage API)#302

Merged
maximelb merged 1 commit into
cli-v2from
cli-quota-usage
Jun 12, 2026
Merged

cli: add org quota-usage command (getOrgQuotaUsage API)#302
maximelb merged 1 commit into
cli-v2from
cli-quota-usage

Conversation

@maximelb

Copy link
Copy Markdown
Contributor

Summary

Adds CLI + SDK support for the new getOrgQuotaUsage API (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 /online count (which weights EPP/response-mode sensors at 0), this is the value to size sensor_quota against, and it can read higher than the online count.

Response shape: { "usage": int, "quota": int, "breakdown": { <category>: { "n": int, "quota": float } } }.

Changes

  • SDKOrganization.get_quota_usage() (limacharlie/sdk/organization.py)
  • CLIlimacharlie org quota-usage, with --ai-help explain text (limacharlie/commands/org.py)
  • Docs — added to doc/cli/platform-admin.md
  • Tests — SDK + CLI unit tests, plus updates to the command-map lint and subcommand-structure regression lists

Testing

pytest passes for all org/quota/lint tests. The pre-existing failures in test_search_checkpoint_cli.py / test_search_output.py are date-dependent and present on the base cli-v2 branch, unrelated to this change.

🤖 Generated with Claude Code

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>
@maximelb maximelb requested a review from lcbill June 12, 2026 13:56
@maximelb maximelb marked this pull request as ready for review June 12, 2026 13:56
@maximelb maximelb merged commit 969856e into cli-v2 Jun 12, 2026
7 checks passed
@maximelb maximelb deleted the cli-quota-usage branch June 12, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant