logo
logo

Commands client

The SDK provides a Commands client to execute commands that are publicly registered in Sitecore Content Hub.

Note

The client variable in the following code examples refers to the IMClient instance. When using the Web SDK, the variable name can be chosen freely, but it 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:

JToken result = await MClient.Commands.ExecuteCommandAsync(namespace, name, args);

The result contains the output of the command.

More documentation will be coming soon.

Supported commands

Here is a list of available commands. More documentation is coming soon.

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.themepublish.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

Can we improve this article ? Provide feedback