Class ExportCommand

Exports the audit log from the selected Content Hub instance.

Namespace: Sitecore.CH.Cli.Plugin.Audit.Commands
Assembly: Sitecore.CH.Cli.Plugin.Audit.dll
public class ExportCommand : BaseCommand<ExportCommandHandler>

Required parameters

  • --source -s Specifies the source audit log. Possible values: Action, Business, Raw, Reporting, Scripting, Trigger, User

Optional parameters

  • --format -f Defines the output format. Default value: JSON
  • --start-time -t Defines the start date and time for the log export. Default value: <now> - 1 hour
  • --span -sp Specifies the time span for the export. Default value: 1 hour
  • --wait -w Determines whether to wait for the export to complete or not.
  • --out -o Specifies the output file name.
  • --order-id Specifies whether the raw order id returned or not.
  • --endpoint -e Specifies an alternative endpoint name for the execution of this command.

Global parameters

  • -? --help -h Show this help message and exit.
  • -v --verbosity Enables verbose logging.

Export a log using the default parameters:

ch-cli audit export --source Raw --wait

Queue an export job and retrieve the raw job id:

ch-cli audit export --source Raw --order-id

Export a log using a customized date range:

ch-cli audit export --source User --format Csv --start-time "2020-11-01 00:00:00" --span 06:00:00 --wait

Export a log and save the resulting package:

ch-cli audit export --source User --out "<local path>"

Can we improve this article ? Provide feedback