Class ExportCommand
Exports the audit log from the selected Content Hub instance.
Inheritance
object
System.CommandLine.Symbol
System.CommandLine.IdentifierSymbol
Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand
Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand<THandler>Sitecore.CH.Cli.Plugin.Audit.CommandHandlers.ExportCommandHandler
ExportCommand
Namespace: SitecoreSitecore.CHSitecore.CH.CliSitecore.CH.Cli.PluginSitecore.CH.Cli.Plugin.AuditCommands
Assembly: Sitecore.CH.Cli.Plugin.Audit.dll
Syntax
RequestResponse
public class ExportCommand : BaseCommand<ExportCommandHandler>Remarks
Required parameters
--source -sSpecifies the source audit log. Possible values: Action, Business, Raw, Reporting, Scripting, Trigger, User
Optional parameters
--format -fDefines the output format. Default value: JSON--start-time -tDefines the start date and time for the log export. Default value: <now> - 1 hour--span -spSpecifies the time span for the export. Default value: 1 hour--wait -wDetermines whether to wait for the export to complete or not.--out -oSpecifies the output file name.--order-idSpecifies whether the raw order id returned or not.--endpoint -eSpecifies an alternative endpoint name for the execution of this command.
Global parameters
-? --help -hShow this help message and exit.-v --verbosityEnables verbose logging.
Examples
Export a log using the default parameters:
RequestResponse
ch-cli audit export --source Raw --waitQueue an export job and retrieve the raw job id:
RequestResponse
ch-cli audit export --source Raw --order-idExport a log using a customized date range:
RequestResponse
ch-cli audit export --source User --format Csv --start-time "2020-11-01 00:00:00" --span 06:00:00 --waitExport a log and save the resulting package:
RequestResponse
ch-cli audit export --source User --out "<local path>"