- Clients
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:
The result contains the output of the command.
Supported commands
Here is a list of available commands by namespace:
external.action
- Command name: Arguments
external.action:
base
- Command name: Arguments
delete.entities:
m.asset
- Command name: Arguments
checkin:
checkout:
create.draft:
discard:
download.onedrive:
import:
publish.draft:
setmaster:
unlock:
m.chili
- Command name: Arguments
createpublication:
deletechilipublication:
duplicatepublication:
getgenerationconfiguration:
m.collection
- Command name: Arguments
enable.collection:
m.drm
- Command name: Arguments
ask.usagerights:
order:
order.restricted.authorized:
order.restricted.nonauthorized:
validate.usagerights:
validate.usagerights.request:
m.entity
- Command name: Arguments
removefromrelation:
updaterelation:
m.file
- Command name: Arguments
create.video.alternative:
m.job
- Command name: Arguments
canceljob:
Note
The canceljob command stops processes for Import and MassEdit table jobs only. It does not affect Processing jobs.
m.portal.senddummyemail
- Command name: Arguments
send.email:
m.portal.theme
- Command name: Arguments
duplicate.theme:
generate.theme:
enabledisable.theme:
set.default:
m.portal.version
- Command name: Arguments
publish.version:
m.print
- Command name: Arguments
copy.publication:
create.annotation:
delete.annotation:
delete.publication:
m.security
- Command name: Arguments
applyusergrouprole:
applyuserrole:
getpermissions:
removeusergrouprole:
removeuserrole:
setroles:
m.taxonomy
- Command name: Arguments
move.taxonomy:
update.sortorder:
portal
- Command name: Arguments
change.layout:
clone.page:
create.pagecomponent:
delete.page:
delete.tabspagecomponenttab:
deleteormarkasdeleted.discussion:
download.excel:
duplicate.pagecomponent:
log.speedtest:
migrate.layout:
paste.pagecomponent:
save.translation:
setbackground:
whatsNewVisualized:
project
- Command name: Arguments
accept.task:
add.predecessor:
block.review:
cancel.task:
complete.task:
copy.block:
create.asset.localization:
decline.task:
enable.mproject:
invoke.task:
like:
parallel.approve:
remove.predecessor:
send.to.dam:
set.block.lifecyclestatus:
set.deliverables.lifecyclestatus:
set.inherits.security:
status.deliverable:
take.task:
task.remind:
update.timeline:
derivatives
- Command name: Arguments
create.variant:
create.draft:
detach.draft:
stateflow
- Command name: Arguments
assign.stateflow: target_id - the ID of the entity to add the state flow to. Required.state_flow_id - the ID of the state flow to assign to the entity. Required.initial_state_id - the ID of the initial state to apply within the state flow. Optional.Example:
apply.state: target_id - the ID of the entity to apply the state to. Required.route_id - the ID of the route to apply for state transition. Required.Example:
If you have suggestions for improving this article, let us know!