CLI: Activity records
Commands to view a space’s activity records (audit log) and export them as CSV. Common flags that you can add to any command (--host, --json, and others) are in the CLI command reference.
| Command | Description |
|---|---|
hakocms-cli audit-logs export |
Export a space’s audit log as CSV |
hakocms-cli audit-logs list |
List a space’s activity records (requires the audit_logs.read permission) |
hakocms-cli audit-logs export
Section titled “hakocms-cli audit-logs export”Export a space’s audit log as CSV.
hakocms-cli audit-logs export [OPTIONS] --from <TEXT> --to <TEXT>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
--instance |
Export the audit log entries that do not belong to a space as CSV (environment administrators only) |
-o, --output <PATH> |
Where to write (- for standard output). If omitted, standard output |
--force |
Overwrite the file if it exists |
--from <TEXT> |
Start of the period (ISO 8601 with a time zone offset). Inclusive (required) |
--to <TEXT> |
End of the period (ISO 8601 with a time zone offset). Exclusive (required) |
--action <TEXT> |
Action name. If it ends with ., matches by prefix (entry. for all entry actions) |
--actor-id <TEXT> |
ID of the actor (a user or an API key) |
--target-type <TEXT> |
Target type (entry and so on) |
--target-id <TEXT> |
Target ID |
hakocms-cli audit-logs list
Section titled “hakocms-cli audit-logs list”List a space’s activity records (requires the audit_logs.read permission)
The space’s audit log. Requires audit_logs.read.
hakocms-cli audit-logs list [OPTIONS]| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
--from <TEXT> |
Start of the period (ISO 8601 with a time zone offset). Inclusive |
--to <TEXT> |
End of the period (ISO 8601 with a time zone offset). Exclusive |
--action <TEXT> |
Action name. If it ends with ., matches by prefix (entry. for all entry actions) |
--actor-id <TEXT> |
ID of the actor (a user or an API key) |
--target-type <TEXT> |
Target type (entry and so on) |
--target-id <TEXT> |
Target ID |
--limit <N> |
Number of items to output (default 30) |
--all |
Follow all pages |
--instance |
Audit log entries that do not belong to a space (environment administrators only) |