# REST APIを使用したジャーニーの一時停止と再開 制御できない状況により一時停止して再開する必要がある場合や、ジャーニーが期待した結果を生み出していない場合に修正措置を講じるために、ライブキャンペーンを一時停止する必要がある状況に遭遇することがあります。 * 一時停止は、ジャーニーの状態更新、アクティベーション、およびウェイトステップのカウントに影響します。たとえば、ジャーニーが一時停止されている場合、3日間のウェイトステップのカウントは無視され、ジャーニーが再開されるとウェイトステップのタイミングが継続されます。 * 一時停止中のジャーニーの名前、説明、およびアクティベーションは変更できますが、ジャーニーが一時停止状態の間はアクティベーションのスケジュールを編集することはできません。そうしようとするとエラーが発生します。 この記事には以下が含まれます: * [ジャーニーを一時停止する](#pause-a-journey) * [ジャーニーを再開する](#resume-a-journey) ## ジャーニーを一時停止する ジャーニーを一時停止する必要がある場合、paused値をtrueに設定することで、ジャーニーまたはアクティベーションワークフローのスケジュールを停止できます。ライブジャーニーのみを一時停止できます。一時停止期間中は、アクティベーションのスケジュール設定を変更することはできません。編集権限のないユーザーは403エラーを受け取ります。 PATCHメソッドとジャーニーIDを使用して、既存のジャーニーを一時停止します。次の例では、ジャーニーIDは63050です。 ### サンプルリクエスト ```http PATCH {{baseUrl}}entities/journeys/63050/pause ``` ### サンプルレスポンス ```json { "data": { "id": "63050", "type": "journey", "attributes": { "audienceId": "127517", "name": "activation test", "description": "", "state": "launched", "goal": null, "createdAt": "2023-01-11T19:37:43.136Z", "updatedAt": "2023-01-11T21:13:30.109Z", "launchedAt": "2023-01-11T19:56:58.768Z", "paused": true, "pausedAt": "2023-01-11T21:13:30.059Z", "journeyStages": [ { "id": "78147", "name": "S1", "description": null, "steps": { "30f11333-1e8c-4f1f-b443-81911dae831d": { "type": "Activation", "name": "Act1_S1_63050", "journeyActivationStepId": "90262", "next": "5ddb010d-51f0-4b97-a025-204e0e4dd214" }, "5ddb010d-51f0-4b97-a025-204e0e4dd214": { "type": "Activation", "name": "Act2_S1_63050", "journeyActivationStepId": "90263", "next": "" } }, "rootStep": "30f11333-1e8c-4f1f-b443-81911dae831d", "entryCriteria": { "name": "entry_1", "segmentId": "552283", "description": "" }, "milestone": { "name": "entry_2", "segmentId": "552285", "description": "Profile has more than one item in its wishlist." }, "exitCriterias": null }, { "id": "78149", "name": "S2", "description": null, "steps": { "2cc6bd60-b66e-4a3a-b7ec-f3c41a36f384": { "type": "DecisionPoint", "branches": [ { "id": "9c92bf31-3eb2-47f3-ab2c-5dddf4ed29e5", "name": "US/Canada/UK", "description": "", "segmentId": "552286", "excludedPath": false, "next": "e3438506-794b-4464-b9bf-6305ea7a2b45" }, { "id": "8f611b2a-e8ad-41f3-9142-bba3041d09b0", "name": "France/Japan/India", "description": "", "segmentId": "552287", "excludedPath": false, "next": "172193bd-8093-42d0-8055-d019ba61d018" }, { "id": "af6ae62e-4b76-4eb1-afe8-d65a3283b146", "name": null, "description": null, "segmentId": "552288", "excludedPath": true, "next": "a6b04e15-60a5-4369-ab3d-dfacadee91b9" } ] }, "e3438506-794b-4464-b9bf-6305ea7a2b45": { "type": "Activation", "name": "Act1_S2_63050", "journeyActivationStepId": "90264", "next": "f08c2e01-e937-4f04-8759-1f19d960a87c" }, "f08c2e01-e937-4f04-8759-1f19d960a87c": { "type": "Activation", "name": "Act2_S2_63050", "journeyActivationStepId": "90265", "next": "" }, "172193bd-8093-42d0-8055-d019ba61d018": { "type": "Merge", "next": "8e4e7681-d75f-40e2-a334-bfacdff54eb8" }, "8e4e7681-d75f-40e2-a334-bfacdff54eb8": { "type": "Activation", "name": "Act5_S2_63050", "journeyActivationStepId": "90268", "next": "d2c74c0b-4f6b-488f-8532-391e75d26ebc" }, "d2c74c0b-4f6b-488f-8532-391e75d26ebc": { "type": "Activation", "name": "Act5_S2_63050", "journeyActivationStepId": "90269", "next": "" }, "a6b04e15-60a5-4369-ab3d-dfacadee91b9": { "type": "Activation", "name": "Act3_S2_63050", "journeyActivationStepId": "90266", "next": "de72fc02-0499-4cde-9476-3c0354a7fbff" }, "de72fc02-0499-4cde-9476-3c0354a7fbff": { "type": "Activation", "name": "Act4_S2_63050", "journeyActivationStepId": "90267", "next": "172193bd-8093-42d0-8055-d019ba61d018" } }, "rootStep": "2cc6bd60-b66e-4a3a-b7ec-f3c41a36f384", "entryCriteria": { "name": "entry_2", "segmentId": "552285", "description": "Profile has more than one item in its wishlist." }, "milestone": null, "exitCriterias": null } ] }, "relationships": { "parentFolder": { "data": { "id": "360172", "type": "folder-segment" } }, "createdBy": { "data": { "id": "1350", "type": "user" } }, "updatedBy": { "data": { "id": "1350", "type": "user" } } } } } ``` ## ジャーニーを再開する ジャーニーを再開する必要がある場合、paused値をfalseに設定することで、ジャーニーまたはアクティベーションワークフローのスケジュールを再開できます。一時停止期間はRDSイベントとして記録されます。編集権限のないユーザーは403エラーを受け取ります。 1. PATCHメソッドとジャーニーIDを使用して、既存のジャーニーを再開します。次の例では、ジャーニーIDは63050です。 ### サンプルリクエスト ```http PATCH {{baseUrl}}entities/journeys/63050/resume ``` ### サンプルレスポンス ```json { "data": { "id": "63050", "type": "journey", "attributes": { "audienceId": "127517", "name": "activation test", "description": "", "state": "launched", "goal": null, "createdAt": "2023-01-11T19:37:43.136Z", "updatedAt": "2023-01-11T21:13:30.109Z", "launchedAt": "2023-01-11T19:56:58.768Z", "paused": false, "pausedAt": "2023-01-11T21:13:30.059Z", "...": "追加の属性がここに入ります" }, "relationships": {} } } ```