Publish or unpublish content and media items

To publish or unpublish content and media items from the connected Content Hub ONE tenant, use the publish or unpublish commands. All operations related to content items are based on the ch-one-cli delivery content command. All operations related to media items are based on the ch-one-cli delivery media command.

Note

In some of the examples, the --id parameter has a value that includes a wildcard (*). Assigning wildcards to a parameter lets you target data based on a pattern instead of a literal value. For example, pushing content with an ID of B* pushes all items with an ID that starts with B.

Publish

You can specify the content and media items you want to publish by appending parameters to the command, as shown in the following examples.

Content items

# Publish all content items of a specific type for all locales
ch-one-cli delivery content publish --content-type "SampleArticle" --id "*" --locale "*"

# Publish all content items of a specific type and a specific locale
ch-one-cli delivery content publish --content-type "SampleArticle" --id "*" --locale "en-GB"

# Publish all content items of a specific type and null locale
ch-one-cli delivery content publish --content-type "SampleArticle" --id "*"

# Publish a content item with a specific ID for all locales
ch-one-cli delivery content publish --content-type "SampleArticle" --id "PublishThisContentItem" --locale "*"

# Publish a content item with a specific ID and a specific locale
ch-one-cli delivery content publish --content-type "SampleArticle" --id "PublishThisContentItem" --locale "en-GB"

# Publish all content items of a specific type and null locale
ch-one-cli delivery content publish --content-type "SampleArticle" --id "PublishThisContentItem"

Media items


# Publish all media items
ch-one-cli delivery media publish --id "*"

# Publish a media item with a specific ID
ch-one-cli delivery media publish --id "PublishThisMediaItem"

Unpublish

You can specify the content and media items you want to unpublish by appending parameters to the command, as shown in the following examples.

Content items

# Unpublish all content items of a specific type for all locales
ch-one-cli delivery content unpublish --content-type "SampleArticle" --id "*" --locale "*"

# Unpublish all content items of a specific type and a specific locale
ch-one-cli delivery content unpublish --content-type "SampleArticle" --id "*" --locale "en-GB"

# Unpublish all content items of a specific type and null locale
ch-one-cli delivery content unpublish --content-type "SampleArticle" --id "*"

# Unpublish a content item with a specific ID for all locales
ch-one-cli delivery content unpublish --content-type "SampleArticle" --id "PublishThisContentItem" --locale "*"

# Unpublish a content item with a specific ID and a specific locale
ch-one-cli delivery content unpublish --content-type "SampleArticle" --id "PublishThisContentItem" --locale "en-GB"

# Unpublish all content items of a specific type and null locale
ch-one-cli delivery content unpublish --content-type "SampleArticle" --id "PublishThisContentItem"

Media items


# Unpublish all media items
ch-one-cli delivery media unpublish --id "*"

# Unpublish a media item with a specific ID
ch-one-cli delivery media unpublish --id "PublishThisMediaItem"
If you have suggestions for improving this article, let us know!