Skip to main content
This documentation is for the federal deployments of Devin. Back to Devin Docs
The Python SDK (windsurf_analytics.py) is a command-line client for the endpoints in the federal API: usage reports, ACU consumption, group management, and user ACU caps. Contact your Cognition representative to obtain the script for your deployment.

Requirements

  • Python 3
  • The requests library: pip install requests

Authentication

Every command takes these shared flags: The service key’s role must carry the permission required by each command — see the permission table. All analytics commands also require a team tier with analytics API access.

Commands

Running the script without a command (the original invocation) runs the usage report.

Output and errors

All commands print JSON to stdout. Paginated results (ACU consumption user rows, list-groups, list-group-members) are automatically followed to the last page and merged into a single response. API errors are printed to stderr as code: message and the script exits with status 1.

Examples

Per-user usage report

ACU consumption

acu-consumption flags: --current-cycle or --start/--end select the period; --include-team-total, repeatable --group-id (max 100), and mutually exclusive --team-user-rows / --group-user-rows GROUP_ID select the data; --page-size tunes the per-request page size (all pages are fetched regardless). At least one data selection flag is required. A group-scoped key can select only its assigned group and cannot request team totals or team user rows.

Group management

User ACU caps