Content Hub includes several Drush commands for both normal product use and for more advanced administration. You can use the commands to administer your content from the command line.
Note
For more information about Drush, see Introduction to Drush.
Command | Description |
---|---|
content-hub-connect | Connect to Content Hub |
content-hub-compare | Compares the version of an entity from a local source and a remote source and prints the differences |
content-hub-delete | Deletes a single entity from the Content Hub |
content-hub-diagnostic | Perform diagnostic checks on the Content Hub |
content-hub-disconnect | Disconnect the client from the Content Hub |
content-hub-export | Export a local entity to the Content Hub |
content-hub-export-block | Export a core custom block to Content Hub |
content-hub-list | List content entities existing in the Content Hub |
content-hub-local | Prints an entity (in CDF format) from a local source (a Drupal website) |
content-hub-purge | Deletes all entities from the Content Hub (deprecated in Content Hub 1.18.0 or later) |
content-hub-regenerate-secret | Regenerates the shared secret used for webhook verification |
content-hub-remote | Prints an entity (in CDF format) from a remote source (the Content Hub) |
content-hub-update-secret | Updates the shared secret used for webhook verification |
content-hub-webhook | Perform a webhook management operation |
queue-list | General Drush command that returns additional Content Hub-related results |
queue-run | General Drush command that accepts additional Content Hub-related arguments |
The following commands are restricted by the user’s access key:
Important
Using the following commands can remove data from Content Hub.
Command | Description |
---|---|
content-hub-mapping | Shows Elastic Search field mappings from Content Hub |
content-hub-purge | Deletes all entities from the Content Hub (available in version 1.30 or later) |
content-hub-reindex | Reindex all entities in Content Hub |
content-hub-restore | Restores the backup taken by a previous execution of the content-hub-purge command |
content-hub-connect
¶Connects to Content Hub.
Alias | Arguments |
---|---|
|
|
content-hub-compare
¶Compares the version of an entity from a local source and a remote source and prints the differences.
Alias | Arguments |
---|---|
ch-comp |
entity-type
entity-id - The UUID of the
entity |
content-hub-delete
¶Deletes a single entity from the Content Hub.
Alias | Arguments |
---|---|
ch-delete |
entity-id - The UUID of the entity |
content-hub-diagnostic
¶Perform certain diagnostics on the Content Hub.
Alias | Arguments |
---|---|
|
none |
content-hub-disconnect
¶Disconnect the client from the Content Hub.
Alias | Arguments |
---|---|
|
none |
content-hub-export
¶Export a local entity to the Content Hub.
Alias | Arguments |
---|---|
|
You can pass an array of options to control the export:
|
content-hub-export-block
¶Export a core custom block to the Content Hub
Alias | Arguments |
---|---|
|
bid - The block ID to export |
content-hub-list
¶List content entities that exist in the Content Hub.
Alias | Arguments |
---|---|
ch-list |
You can pass an array of options to control the output:
|
content-hub-local
¶Prints an entity (in CDF format) from a local source (a Drupal website)
Alias | Arguments |
---|---|
ach-lo |
|
content-hub-mapping
¶Shows Elastic Search field mappings for Content Hub.
Alias | Arguments |
---|---|
ch-mapping |
none |
content-hub-purge
¶(Developer only) - Deletes all entities from Content Hub. This is disabled in Content Hub 1.18.0 to 8.x-1.12.
Alias | Arguments |
---|---|
ch-purge |
|
Note
After a purge, all content must be manually re-exported.
content-hub-regenerate-secret
¶Regenerates the shared secret used for webhook verification.
Alias | Arguments |
---|---|
ch-regsec |
none |
content-hub-remote
¶Prints an entity (in CDF format) from a remote source (the Content Hub).
Alias | Arguments |
---|---|
ch-re |
entity-id - The UUID of the entity |
content-hub-reindex
¶(Developer only) - Reindexes all entities in Content Hub
Alias | Arguments |
---|---|
ch-reindex |
|
content-hub-restore
¶(Developer only) - Restores the backup taken by a previous
execution of the purge
command.
Alias | Arguments |
---|---|
ch-restore |
|
content-hub-update-secret
¶Updates the shared secret used for webhook verification.
Alias | Arguments |
---|---|
ch-upsec |
none |
content-hub-webhook
¶Perform a webhook management operation.
Alias | Arguments |
---|---|
|
op : The operation to use:
register , unregister , or
list —requires the
webhook_url as an option |
queue-list
¶This command is not specific to Content Hub, but will return more results with it. See drush queue-list.
Result | Description |
---|---|
content_hub_webhook_queue |
The number of items in the Content Hub webhook queue |
queue-run
¶This command is not specific to Content Hub. See drush queue-run.
Argument | Description |
---|---|
content_hub_webhook_queue |
Processes the remaining Content Hub webhook queue |