1. Sitecore.CH.Cli.Plugin.System.Commands

Class ImportPackageCommand

Imports a package into the selected Content Hub instance.

Inheritance

object

System.CommandLine.Symbol

System.CommandLine.IdentifierSymbol

Command

Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand

Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommandSitecore.CH.Cli.Plugin.System.CommandHandlers.ImportPackageCommandHandler

ImportPackageCommand

Namespace: SitecoreSitecore.CHSitecore.CH.CliSitecore.CH.Cli.PluginSitecore.CH.Cli.Plugin.SystemCommands

Assembly: Sitecore.CH.Cli.Plugin.System.dll

Syntax

public class ImportPackageCommand : BaseCommand<ImportPackageCommandHandler>

Remarks

Required parameters

  • --source -s Specifies the path to the import package. Can be either a local file path or a HTTP/HTTPS URL

Optional parameters

  • --wait -w Determines whether to wait for the import to complete or not.
  • --job-id Specifies whether the job ID is returned or not.

Global parameters

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

Examples

Queue an import without waiting:

ch-cli system import --source "<local file path or HTTP/HTTPS URL>"

Queue an import without waiting and retrieve the job ID:

ch-cli system import --source "<local file path or HTTP/HTTPS URL>" --job-id

Perform an import with waiting:

ch-cli system import --source "<local file path or HTTP/HTTPS URL>" --wait
If you have suggestions for improving this article, let us know!