1. WebクライアントSDK

コマンド・クライアント

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

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

このSDKは、Sitecore Content Hubに公開されているコマンドを実行するためのCommands clientを提供します。

メモ

次のコード例のclient変数は、IMClientインスタンスを参照します。Web SDKを使用する場合、変数名は自由に選択できますが、ドキュメントではインスタンス化時にclientとも呼ばれます。

コマンドの実行

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

  • コマンド名

  • コマンド名前空間

  • コマンド引数 (コマンドによる)

SDKを使用してコマンドを実行するには、次のようにします。

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

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

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

以下は、名前空間別に使用可能なコマンドのリストです。

external.アクション

コマンド名

引数

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>))

コマンド名

引数

delete.entities

new JObject(
    new JProperty("ids", <collection>),
    new JProperty("identifiers", <collection>))

エムアセット

コマンド名

引数

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.チリ

コマンド名

引数

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.コレクション

コマンド名

引数

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.エンティティ

コマンド名

引数

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.ファイル

コマンド名

引数

create.video.alternative

new JObject(
    new JProperty("entityId", <long>),
    new JProperty("seekPosition", <double>))

エムジョブ

コマンド名

引数

canceljob

new JObject(new JProperty("entity_Id", <long>))
手記

canceljobコマンドは、ImportジョブとMassEdit tableジョブのプロセスのみを停止します。Processingジョブには影響しません。

m.portal.senddummyメール

コマンド名

引数

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>))

enabledisable.theme

new JObject(
    new JProperty("theme_Id", <long>),
    new JProperty("enable", <boolean>))

set.default

new JObject(
    new JProperty("entity_Id", <long>))

m.portal.version

コマンド名

引数

publish.version

new JObject(
    new JProperty("version_Id", <long>))

M.プリント

コマンド名

引数

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.セキュリティ

コマンド名

引数

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.分類学

コマンド名

引数

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>))

ポータル

コマンド名

引数

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()

プロジェクト

コマンド名

引数

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>))

誘導 体

コマンド名

引数

create.variant

new JObject(
                new JProperty("properties_overrides", new JObject()),
                new JProperty("relations_overrides", new JObject()))

create.draft

new JObject(
                new JProperty("state_flow_id", <long>))

detach.draft

new JObject(
                new JProperty("target_entities", <collection>))

ステートフロー

コマンド名

引数

assign.stateflow

  • target_id - ステートフローを追加するエンティティのID。必須。

  • state_flow_id - エンティティに割り当てるステートフローのID。必須。

  • initial_state_id - ステートフロー内で適用する初期ステートのID。随意。

例:

await MClient.Commands.ExecuteCommandAsync("automation","assign.stateflow", new JObject
{
    new JProperty("state_flow_id", 222),
    new JProperty("target_id", 111),
    new JProperty("initial_state_id", 555)
});

apply.state

  • target_id - 状態を適用するエンティティのID。必須。

  • route_id - ステートトランジションに適用するルートのID。必須。

例:

await MClient.Commands.ExecuteCommandAsync("automation", "apply.state", new JObject
{
    new JProperty("target_id", 111),
    new JProperty("route_id", 999)
});
この記事を改善するための提案がある場合は、 お知らせください!