1. コマンド

コマンド クライアント

Version:
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

SDK では、Sitecore Content Hub に公開登録されているコマンドを実行するコマンド クライアントを提供しています。

注意

次のコード例の client 変数は IMClient インスタンスを意味します。Web SDK を使用する場合、変数名は自由に選択できますが、ドキュメントの例では client という名前が使われています。

コマンドの実行

コマンドを実行するには、次の情報が必要です。

  • コマンド名
  • コマンドの名前空間
  • コマンドの引数 (コマンドによって異なります)

SDK を使用してコマンドを実行するには:

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

結果には、コマンドの出力が含まれます。

サポートされているコマンド

名前空間別に使用可能なコマンドのリストは次のとおりです。

external.action

コマンド名引数
external.action
new JObject(
    new JProperty("entity_id", <long>),
    new JProperty("action_id", <long>),
    new JProperty("properties", <collection>),
    new JProperty("relations", <long>),
    new JProperty("action_execution_source", <string>)),
    new JProperty("extra_data", <collection>))

base

コマンド名引数
delete.entities
new JObject(
    new JProperty("ids", <collection>),
    new JProperty("identifiers", <collection>))

m.assset

コマンド名引数
checkin
new JObject(new JProperty("asset_id", <long>))
checkout
new JObject(new JProperty("entity_ids", <collection>))
create.draft
new JObject(new JProperty("entity_id", <long>))
discard
new JObject(new JProperty("asset_id", <long>))
download.onedrive
new JObject(new JArray("entity_ids", <collection>))
import
new JObject(
    new JProperty("entityId", <long>),
    new JProperty("type", <ImportSchemaType>),
    new JProperty("remove_schema", <boolean>),
    new JProperty("url", <string>))
publish.draft
new JObject(new JProperty("entity_id", <long>))
setmaster
new JObject(
    new JProperty("new_master_id", <long>),
    new JProperty("entity_id", <long>),
    new JProperty("master_relation", <string>))
unlock
new JObject(new JProperty("entity_id", <long>))

m.chili

コマンド名引数
createpublication
new JObject(new JProperty("id", <long>))
deletechilipublication
new JObject(new JProperty("publicationId", <long>))
duplicatepublication
new JObject(new JProperty("id", <long>))
getgenerationconfiguration
new JObject(
    new JProperty("qualities", <collection>),
    new JProperty("endpoint", <string>),
    new JProperty("load_endpoint", <string>),
    new JProperty("editor_token", <string>))

m.collection

コマンド名引数
enable.collection
new JObject(
    new JProperty("definition_id", <long>),
    new JProperty("enable", <boolean>),
    new JProperty("page_name", <string>))

m.drm

コマンド名引数
ask.usagerights
new JObject(new JProperty("requestId", <long>))
order
new JObject(
    new JProperty("requestId", <long>),
    new JProperty("order_request", <OrderRequestResource>),
    new JProperty("item_name_resolver_id", <string>),
    new JProperty("culture", <string>),
    new JProperty("order_id", <long>),
    new JProperty("custom_name", <string>),
    new JProperty("setting_category", <string>),
    new JProperty("setting_name", <string>))
order.restricted.authorized
new JObject(
    new JProperty("requestId", <long>),
    new JProperty("order_request", <OrderRequestResource>),
    new JProperty("item_name_resolver_id", <string>),
    new JProperty("culture", <string>),
    new JProperty("authorized", <boolean>),
    new JProperty("custom_name", <string>),
    new JProperty("setting_category", <string>),
    new JProperty("setting_name", <string>),
    new JProperty("order_id", <long>))
order.restricted.nonauthorized
new JObject(
    new JProperty("requestId", <long>),
    new JProperty("order_request", <OrderRequestResource>),
    new JProperty("item_name_resolver_id", <string>),
    new JProperty("culture", <string>),
    new JProperty("authorized", <boolean>),
    new JProperty("custom_name", <string>),
    new JProperty("setting_category", <string>),
    new JProperty("setting_name", <string>))
validate.usagerights
new JObject(
    new JProperty("requestId", <long>),
    new JProperty("restricted", <boolean>),
    new JProperty("authorized", <boolean>),
    new JProperty("explicitApprovalRequired", <boolean>),
    new JProperty("renditions", <JToken>),
    new JProperty("targetId", <long>))
validate.usagerights.request
new JObject(
    new JProperty("targetId", <long>),
    new JProperty("relations", <collection>),
    new JProperty("start_date", <DateTimeOffset>),
    new JProperty("end_date", <DateTimeOffset>))

m.entity

コマンド名引数
removefromrelation
new JObject(
    new JProperty("entityId", <long>),
    new JProperty("relationName", <string>),
    new JProperty("relationRole", <RelationRole>),
    new JProperty("ids", <collection>))
updaterelation
new JObject(
    new JProperty("entityId", <long>),
    new JProperty("relation", <string>),
    new JProperty("role", <RelationRole>),
    new JProperty("action", <RelationAction>),
    new JProperty("ids", <collection>))

m.file

コマンド名引数
create.video.alternative
new JObject(
    new JProperty("entityId", <long>),
    new JProperty("seekPosition", <double>))

m.job

コマンド名引数
canceljob
new JObject(new JProperty("entity_Id", <long>))

m.portal.senddummyemail

コマンド名引数
send.email
new JObject(
    new JProperty("template_Id", <long>),
    new JProperty("user_email", <string>),
    new JProperty("variables", <JToken>),
    new JProperty("templateType", <string>))

m.portal.theme

コマンド名引数
duplicate.theme
new JObject(new JProperty("themeId", <long>))
generate.theme
new JObject(new JProperty("entity_id", <long>))
publish.theme
new JObject(
    new JProperty("theme_Id", <long>),
    new JProperty("publish", <boolean>),
    new JProperty("page_Id", <long>))
set.default
new JObject(
    new JProperty("entity_Id", <long>),
    new JProperty("page_Id", <long>))
publish.version
new JObject(new JProperty("version_Id", <long>))

m.print

コマンド名引数
copy.publication
new JObject(
    new JProperty("template_id", <long>),
    new JProperty("culture", <CultureInfo>))
create.annotation
new JObject(
    new JProperty("annotation", <JToken>),
    new JProperty("publicationId", <long>))
delete.annotation
new JObject(
    new JProperty("annotationId", <long>))
delete.publication
new JObject(
    new JProperty("publicationId", <long>))

m.security

コマンド名引数
applyusergrouprole
new JObject(
    new JProperty("usergroup_id", <long>),
    new JProperty("role", <string>),
    new JProperty("target_id", <long>))
applyuserrole
new JObject(
    new JProperty("user_id", <long>),
    new JProperty("role", <string>),
    new JProperty("target_id", <long>))
getpermissions
new JObject(new JProperty("definitions", <collection>))
removeusergrouprole
new JObject(
    new JProperty("usergroup_id", <long>),
    new JProperty("role", <string>),
    new JProperty("target_id", <long>))
removeuserrole
new JObject(
    new JProperty("user_id", <long>),
    new JProperty("role", <string>),
    new JProperty("target_id", <long>))
setroles
new JObject(
    new JProperty("user_roles", <collection>),
    new JProperty("usergroup_roles", <collection>),
    new JProperty("target_id", <long>))

m.taxonomy

コマンド名引数
move.taxonomy
new JObject(
    new JProperty("relation", <string>),
    new JProperty("id_to_move", <long>),
    new JProperty("parentId", <long>))
update.sortorder
new JObject(new JProperty("sortOrder", <collection>))

portal

コマンド名引数
change.layout
new JObject(
    new JProperty("pageId", <long>),
    new JProperty("layoutName", <string>))
clone.page
new JObject(
    new JProperty("TemplatePageId", <long>),
    new JProperty("ParentPageId", <long>),
    new JProperty("PageName", <string>),
    new JProperty("CalculatedIdentifier", <boolean>))
create.pagecomponent
new JObject(
    new JProperty("pageId", <long>),
    new JProperty("zoneId", <long>),
    new JProperty("componentType", <string>),
    new JProperty("componentData", <string>),
    new JProperty("componentSettings", <string>),
    new JProperty("componentName", <string>),
    new JProperty("componentTitle", <string>),
    new JProperty("componentIsVisible", <boolean>),
    new JProperty("componentUIVisibility", <string>),
    new JProperty("componentIsNested", <boolean>),
    new JProperty("zoneName", <string>))
delete.page
new JObject(new JProperty("pageId", <long>))
delete.tabspagecomponenttab
new JObject(
    new JProperty("id", <long>),
    new JProperty("tab_name", <string>))
deleteormarkasdeleted.discussion
new JObject(new JProperty("id", <long>))
download.excel
new JObject(
    new JProperty("entityIds", <collection>),
    new JProperty("cultures", <collection>),
    new JProperty("query", <string>),
    new JProperty("type", <string>),
    new JProperty("request_uri", <string>),
    new JProperty("userFriendlyColumnHeaders", <boolean>),
    new JProperty("userFriendlyCellValues", <boolean>),
    new JProperty("filename", <string>),
    new JProperty("selectionComponentId", <long>))
duplicate.pagecomponent
new JObject(
    new JProperty("componentContainerId", <long>),
    new JProperty("originalPageComponentId", <long>),
    new JProperty("componentType", <string>),
    new JProperty("calculatedIdentifier", <boolean>))
log.speedtest
new JObject(
    new JProperty("testStatus", <string>),
    new JProperty("portalPing", <string>),
    new JProperty("portalDownload", <string>),
    new JProperty("portalUpload", <string>),
    new JProperty("deliveryPing", <string>),
    new JProperty("deliveryDownload", <string>),
    new JProperty("deliveryUpload", <string>))
migrate.layout
new JObject(new JProperty("pageId", <long>))
paste.pagecomponent
new JObject(
    new JProperty("action", <string>),
    new JProperty("page_component_identifier", <string>),
    new JProperty("source_identifier", <string>),
    new JProperty("destination_identifier", <string>))
save.translation
new JObject(
    new JProperty("values", <collection>),
    new JProperty("entry_name", <string>),
    new JProperty("context_name", <string>))
setbackground
new JObject(
    new JProperty("pageId", <long>),
    new JProperty("assetId", <long>),
    new JProperty("position", <string>),
    new JProperty("renditionName", <string>))
whatsNewVisualized
new JObject()

project

コマンド名引数
accept.task
new JObject(new JProperty("taskId", <long>))
add.predecessor
new JObject(
        new JProperty("predecessorid", <long>),
        new JProperty("dependentid", <long>))
block.review
new JObject(
        new JProperty("entityId", <long>),
        new JProperty("pageEntityId", <long>),
        new JProperty("reviewStatusRelation", <string>),
        new JProperty("reviewRelation", <string>),
        new JProperty("status", <string>),
        new JProperty("reason", <string>))
cancel.task
new JObject(new JProperty("taskId", <long>))
complete.task
new JObject(
        new JProperty("taskid", <long>),
        new JProperty("feedback", <string>))
copy.block
new JObject(
        new JProperty("parentId", <long>),
        new JProperty("templateId", <long>),
        new JProperty("overwritePropertyNames", <collection>),
        new JProperty("overwriteRelationNames", <collection>),
        new JProperty("overwritePropertyValues", <JToken>),
        new JProperty("overwriteRelationValues", <collection>),
        new JProperty("overwriteTemplateChildren", <boolean>))
create.asset.localization
new JObject(
        new JProperty("parentassetid", <long>),
        new JProperty("localizationids", <collection>))
decline.task
new JObject(
        new JProperty("taskId", <long>),
        new JProperty("feedback", <string>))
enable.mproject
new JObject(
        new JProperty("definition_id", <long>),
        new JProperty("enable", <boolean>),
        new JProperty("force", <boolean>))
invoke.task
new JObject(new JProperty("id", <long>))
like
new JObject(
        new JProperty("entity_id", <long>),
        new JProperty("value", <string>),
        new JProperty("relation", <string>))
parallel.approve
new JObject(
        new JProperty("entityId", <long>),
        new JProperty("pageEntityId", <long>),
        new JProperty("relation", <string>),
        new JProperty("status", <string>),
        new JProperty("reason", <string>))
remove.predecessor
new JObject(
        new JProperty("predecessorid", <long>),
        new JProperty("dependentid", <long>))
send.to.dam
new JObject(
        new JProperty("entityIds", <collection>),
        new JProperty("statusIdentifier", <string>))
set.block.lifecyclestatus
new JObject(
        new JProperty("id", <long>),
        new JProperty("status", <string>))
set.deliverables.lifecyclestatus
new JObject(
        new JProperty("entityId", <long>),
        new JProperty("status", <string>),
        new JProperty("statusRelation", <string>),
        new JProperty("reason", <string>),
        new JProperty("reasonProperty", <string>))
set.inherits.security
new JObject(
        new JProperty("id", <long>),
        new JProperty("value", <boolean>))
status.deliverable
new JObject(
        new JProperty("id", <long>),
        new JProperty("block_id", <long>),
        new JProperty("content_repository_relation", <string>),
        new JProperty("block_deliverables_relation", <string>),
        new JProperty("block_brief_relation", <string>),
        new JProperty("task_relation", <string>),
        new JProperty("exists_in_dam", <boolean>),
        new JProperty("count_deliverable_blocks", <int>),
        new JProperty("count_brief_blocks", <int>),
        new JProperty("count_tasks", <int>))
take.task
new JObject(new JProperty("taskid", <long>))
task.remind
new JObject(new JProperty("id", <long>))
update.timeline
new JObject(new JProperty("items", <collection>))
この記事を改善するための提案がある場合は、 お知らせください!