---
title: "Class PullEntityCommand"
slug: "cli--sitecore.ch.cli.plugin.serialization.commands.pullentitycommand"
abstract: ""
---
# Class PullEntityCommand

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

## Inheritance

object

System.CommandLine.Symbol

System.CommandLine.IdentifierSymbol

[Command](https://learn.microsoft.com/dotnet/api/system.commandline.command)

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

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

```csharp
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 -u`Update 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:

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

Serialize an entity by ID with its related entities:

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

Serialize all entities, using the specified working directory:

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

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

```csharp
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:

```csharp
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:

```csharp
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):

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