Class PullEntityCommand

Serializes one or more entities from the connected Content Hub instance to the local file system.

Inheritance
object
Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand<THandler>Sitecore.CH.Cli.Plugin.Serialization.CommandHandlers.PullEntityCommandHandler
PullEntityCommand
Namespace: SitecoreSitecore.CHSitecore.CH.CliSitecore.CH.Cli.PluginSitecore.CH.Cli.Plugin.SerializationCommands
Assembly: Sitecore.CH.Cli.Plugin.Serialization.dll
Syntax
RequestResponse

public sealed class PullEntityCommand : BaseCommand<PullEntityCommandHandler>
Remarks

Optional parameters

  • --endpoint -e Specifies an alternative endpoint name for the execution of this command.
  • --name -n Name(s) of entity(ies) to pull. Wildcard allowed.
  • --definition -d Name of entity definition to pull entities for.
  • --id -i Id of entity to pull.
  • --remove-missing -r Remove local-only entities.
  • --include-relations -ir Include related entities.
  • --updates -uUpdate only entities modified in the last minutes (see --minutes).
  • --minutes -m Minutes to go back to look for modified entities. Default is 30 minutes.
  • --folder -f Specifies the a working directory other than the current folder.

Global parameters

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

Serialize an entity by ID:

RequestResponse

ch-cli serialization pull entity --id "<entity id>"

Serialize an entity by ID with its related entities:

RequestResponse

ch-cli serialization pull entity --id "<entity id>" --include-relations

Serialize all entities, using the specified working directory:

RequestResponse

ch-cli serialization pull entity --folder "<local path>"

Serialize all entities that match the specified entity definition, using the specified working directory:

RequestResponse

ch-cli serialization pull entity --definition "<entity definition name>" --folder "<local path>"

Serialize all entities that match the specified name and entity definition, using the specified working directory:

RequestResponse

ch-cli serialization pull entity --name "<name-starts*j>" --definition "<entity definition name>" --folder "<local path>"

Serialize all entities that match the specified entity definition and remove all entities that exist in the file system but not in the connected Content Hub instance:

RequestResponse

ch-cli serialization pull entity --definition "<entity definition name>" --remove-missing

Serialize all entities that match the specified entity definitions and that were updated recently (see --minutes):

RequestResponse

ch-cli serialization pull entity --definition "<entity definition name>" --updates --minutes "<15>"

Do you have some feedback for us?

If you have suggestions for improving this article,