1. Clients

Commands client

The SDK supports executing commands that are registered in the Sitecore Content Hub. This page describes which commands are available and how to execute them.

Note

The client variable in the following code examples refers to the ContentHubClient instance. When using the JavaScript SDK, the variable name can also be chosen freely, but is also called client at instantiation in the documentation.

Executing commands

The following information is needed to execute a command:

  • Command name
  • Command namespace
  • Command arguments (depending on the command)

To execute a command through the SDK:

await client.commands.executeCommandAsync(namespace, command, args )

Supported commands

Here is the list of available commands.

NamespaceCommand name
basedelete.entities
baseDelete
baseDeletePhysicalFile
baseSave
external.actionexternal.action
m.assetcheckin
m.assetcheckout
m.assetcreate.draft
m.assetdelete.draft
m.assetdiscard
m.assetdownload.onedrive
m.assetget.file.link
m.assetimport
m.assetpublish.draft
m.assetsetmaster
m.assetunlock
m.chilicreatepublication
m.chilideletechilipublication
m.chiliduplicatepublication
m.chiligetgenerationconfiguration
m.chilirevalidatechilixml
m.collectionenable.collection
m.collectionunpublish.collection
m.drmask.usagerights
m.drmorder
m.drmorder.restricted.authorized
m.drmorder.restricted.nonauthorized
m.drmvalidate.usagerights
m.drmvalidate.usagerights.request
m.entityremovefromrelation
m.entityupdaterelation
m.filecreate.video.alternative
m.filecreate.video.clip
m.jobcanceljob
m.portal.senddummyemailsend.email
m.portal.themecreate.theme
m.portal.themeduplicate.theme
m.portal.themegenerate.theme
m.portal.themeenabledisable.theme
m.portal.themeset.default
m.portal.versionpublish.version
m.printcopy.publication
m.printcreate.annotation
m.printdelete.annotation
m.printdelete.publication
m.savedsearchsubscribe
m.savedsearchunsubscribe
m.securityapplyusergrouprole
m.securityapplyuserrole
m.securitygetpermissions
m.securityremoveusergrouprole
m.securityremoveuserrole
m.securitysetroles
m.taxonomymove.taxonomy
m.taxonomyupdate.sortorder
portalchange.layout
portalclone.page
portalcreate.page
portalcreate.pagecomponent
portaldelete.page
portaldelete.tabspagecomponenttab
portaldeleteormarkasdeleted.discussion
portaldownload.excel
portalduplicate.pagecomponent
portallog.speedtest
portalmigrate.layout
portalpaste.pagecomponent
portalsave.translation
portalsetbackground
portalwhatsNewVisualized
projectaccept.task
projectadd.predecessor
projectblock.review
projectcancel.task
projectcomplete.task
projectcopy.block
projectcreate.activity
projectcreate.asset.localization
projectdecline.task
projectenable.mproject
projectinvoke.task
projectlike
projectparallel.approve
projectremove.predecessor
projectsend.to.dam
projectset.block.lifecyclestatus
projectset.deliverables.lifecyclestatus
projectset.inherits.security
projectstatus.deliverable
projecttake.task
projecttask.remind
projectupdate.timeline
If you have suggestions for improving this article, let us know!