Getting Started
Make sure to first set up your PlanetScale developer environment. Once you’ve installed thepscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.
The audit log command
Lists all audit logs in an organization. The user running the command must have Organization-level permissions, specifically list_organization_audit_logs.
Usage:
Available sub-commands
The list sub-command flags
The auth-attempts download sub-command
Generates a report of authentication attempts against your Postgres databases and downloads it as a ZIP archive. Each authentication attempt includes information such as the source IP address, credential, targeted database and branch, outcome, and failure details.
Available to Organization Administrators only. Service tokens cannot generate these reports.
Usage:
auth-attempts.csv, .jsonl, or .parquet) and a manifest.json recording the exact window and filters used.
Time window flags
Specify either--since or --start-at. Named values and timestamps without a zone use your local timezone; requests are sent in UTC.
The window is inclusive of
start-at and exclusive of end-at.
Filter flags
Filters combine with AND. Repeat a flag to match any of several values.Output flags
Global flags
Examples
The list sub-command with --org flag
Command:
Pagination
Use the ID from the last result and pass it as the--starting-after to retrieve the next page of results.

