Capping API の使用 work

このページ: Adobe Journey Optimizer の Capping API を使用して、外部システムへの呼び出しを制限するエンドポイントキャップ設定を作成、指定、デプロイ、監視する方法について説明します。

Capping API を使用すると、キャップ設定を作成、設定および監視できます。

この節では、API の使用方法に関する全体的な情報を示します。 API について詳しくは、Adobe Journey Optimizer API ドキュメントを参照してください。

Capping API の説明と Postman コレクション description

次の表に、Capping API で使用できるコマンドを示します。 リクエストサンプル、パラメーター、応答形式などの情報について詳しくは、Adobe Journey Optimizer API ドキュメントを参照してください。

メソッド
パス
説明
POST
list/endpointConfigs
エンドポイントキャップ設定のリストの取得
POST
/endpointConfigs
エンドポイントキャップ設定の作成
POST
/endpointConfigs/{uid}/deploy
エンドポイントキャップ設定のデプロイ
POST
/endpointConfigs/{uid}/undeploy
エンドポイントキャップ設定のデプロイ解除
POST
/endpointConfigs/{uid}/canDeploy
エンドポイントキャップ設定をデプロイできるかどうかの確認
PUT
/endpointConfigs/{uid}
エンドポイントキャップ設定の更新
GET
/endpointConfigs/{uid}
エンドポイントキャップ設定の取得
DELETE
/endpointConfigs/{uid}
エンドポイントキャッピング設定の削除

設定を作成または更新すると、ペイロードの構文と整合性を保証するチェックが自動的に実行されます。
問題が発生した場合、設定の修正に役立つ警告またはエラーが返されます。

また、テスト設定に役立つ Postman コレクションについて詳しくは、こちらを参照してください。

このコレクションは、Adobe I/O コンソールの統合/試す/Postman 用にダウンロード​経由で生成された Postman 変数コレクションを共有するように設定されています。これにより、選択した統合値を含む Postman 環境ファイルが生成されます。

ダウンロードして Postman にアップロードしたら、{JO_HOST}、{BASE_PATH} および {SANDBOX_NAME} の 3 つの変数を追加する必要があります。

  • {JO_HOST}:Journey Optimizerゲートウェイ URL。
  • {BASE_PATH}:API のエントリポイント。
  • {SANDBOX_NAME}:API 操作が行われるサンドボックス名に対応するヘッダー x-sandbox-name(例えば、「prod」)。 詳しくは、サンドボックスの概要を参照してください。

エンドポイントの設定

エンドポイント設定の基本構造は次のとおりです。

{
    "url": "<endpoint URL>",  //wildcards are allowed in the endpoint URL
    "methods": [ "<HTTP method such as GET, POST, >, ...],
    "services": {
        "<service name>": { . //must be "action" or "dataSource"
            "maxHttpConnections": <max connections count to the endpoint (optional)>
            "rating": {
                "maxCallsCount": <max calls to be performed in the period defined by period/timeUnit>,
                "periodInMs": <integer value greater than 0>
            }
        },
        ...
    }
}
IMPORTANT
maxHttpConnections パラメーターは、オプションです。 これを使用すると、Journey Optimizer が外部システムに対して開く接続の数を制限できます。
設定できる最大値は 400 です。 何も指定しない場合、システムは動的なスケーリングに応じて、最大で数千の接続を開く可能性があります。
キャップ設定をデプロイする際に maxHttpConnections 値が設定されていない場合は、デプロイ済みの設定にデフォルトの maxHttpConnections = -1 が追加され、Journey Optimizer はデフォルトのシステム値を使用します。

例:

{
  "url": "https://api.example.org/data/2.5/*",
  "methods": [
    "GET"
  ],
  "services": {
    "action": {
      "rating": {
        "maxCallsCount": 500,
        "periodInMs": 1000
      }
    }
  }
}
IMPORTANT
設定は、デプロイ​エンドポイントを呼び出した後にのみアクティブになります。

警告とエラー

canDeploy​メソッドを呼び出す際、プロセスは設定を検証し、次のいずれかの一意の ID によって識別される検証ステータスを返します。

"ok" or "error"

考えられるエラーは次のとおりです。

  • ERR_ENDPOINTCONFIG_100:キャップ設定:URL が見つからないか、無効です
  • ERR_ENDPOINTCONFIG_101:キャップ設定:不正な URL です
  • ERR_ENDPOINTCONFIG_102:キャップ設定:不正な URL です:ホスト内の URL にワイルド文字を使用することはできません:port
  • ERR_ENDPOINTCONFIG_103:キャップ設定:HTTP メソッドがありません
  • ERR_ENDPOINTCONFIG_104:キャップ設定:呼び出しの評価が定義されていません
  • ERR_ENDPOINTCONFIG_107:キャップ設定:無効な最大呼び出し数(maxCallsCount)です
  • ERR_ENDPOINTCONFIG_108:キャップ設定:無効な最大呼び出し数(periodInMs)です
  • ERR_ENDPOINTCONFIG_111:キャップ設定:エンドポイント設定を作成できません:無効なペイロードです
  • ERR_ENDPOINTCONFIG_112:キャップ設定:エンドポイント設定を作成できません:JSON ペイロードが予想されます
  • ERR_AUTHORING_ENDPOINTCONFIG_1:無効なサービス名 <!--<given value>-->:「dataSource」または「action」である必要があります
  • ERR_AUTHORING_ENDPOINTCONFIG_2: エンドポイントがホワイトリストに登録されていません。管理者にお問い合わせください
    • カスタムアクションのキャッピングルールを設定しようとしたときに、このエラーが表示された場合は、作成または更新ペイロードで「action」(「dataSource」ではなく)をサービス名として設定していることを確認してください。 上記の例を参照してください。

考えられる警告は次のとおりです。

ERR_ENDPOINTCONFIG_106:キャップ設定:最大 HTTP 接続数が定義されていません:デフォルトではキャップなし

ユースケース

この節では、Journey Optimizer でキャップ設定を管理する主なユースケースと、そのユースケースを実装するために必要な関連 API コマンドについて説明します。

各API コマンドの詳細については、APIの説明とPostman コレクション ​を参照してください。

新しいキャップ設定の作成とデプロイ

使用する API 呼び出し:

  1. list - 既存の設定を取得します。
  2. create - 新しい設定を作成します。
  3. candeploy - 設定をデプロイできるかどうかを確認します。
  4. deploy - 設定をデプロイします。
(未デプロイの)キャップ設定の更新とデプロイ

使用する API 呼び出し:

  1. list - 既存の設定を取得します。
  2. get - 特定の設定の詳細を取得します。
  3. update - 設定を変更します。
  4. candeploy - デプロイメントの実施要件を確認します。
  5. deploy - 設定をデプロイします。
デプロイ済みのキャップ設定のデプロイ解除と削除

使用する API 呼び出し:

  1. list - 既存の設定を取得します。
  2. undeploy - 設定をデプロイ解除します。
  3. delete - 設定を削除します。
1 つの手順でデプロイ済みのキャップ設定を削除

1 回の API 呼び出しのみで、forceDelete パラメーターを使用して設定をデプロイ解除および削除できます。

使用する API 呼び出し:

  1. list - 既存の設定を取得します。
  2. delete(forceDelete パラメーターを使用)- デプロイ済みの設定を 1 つの手順で強制的に削除します。
既にデプロイ済みのキャップ設定の更新
note
NOTE
既にデプロイされている設定を更新する場合は、再デプロイが必要です。

使用する API 呼び出し:

  1. list - 既存の設定を取得します。
  2. get - 特定の設定の詳細を取得します。
  3. update - 設定を変更します。
  4. undeploy - 変更を適用する前に設定をデプロイ解除します。
  5. candeploy - デプロイメントの実施要件を確認します。
  6. deploy - 更新された設定をデプロイします。
AI Knowledge Reference

This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.

For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.

  • TL;DR: The Adobe Journey Optimizer Capping API lets you create, configure, deploy, and monitor endpoint capping configurations that limit calls to external systems.

Intents:

  • List, create, retrieve, update, and delete endpoint capping configurations with the Capping API.
  • Deploy and undeploy an endpoint capping configuration, and check with canDeploy whether an endpoint capping configuration can be deployed.
  • Define an endpoint configuration with a URL, HTTP methods, a service name, and a call rating (maxCallsCount and periodInMs).
  • Undeploy and delete a deployed capping configuration in one API call with the forceDelete parameter.
  • Test capping configurations with the Capping API Postman collection.

Glossary:

  • Endpoint capping configuration (product-specific): a configuration that limits calls to an external system, defined by an endpoint URL, HTTP methods, and services with a call rating.
  • maxHttpConnections (product-specific): an optional parameter that restricts the number of connections Journey Optimizer opens to the external system.
  • maxCallsCount (product-specific): the maximum number of calls to be performed in the period set in the rating of an endpoint configuration.
  • forceDelete (product-specific): a parameter of the delete call that undeploys and deletes a deployed configuration in one API call.

Guardrails:

  • The max value that can be set for maxHttpConnections is 400 (hard limit).
  • If no maxHttpConnections value is specified, the system may open up to multiple thousands of connections depending on the dynamic scaling of the system.
  • When the capping configuration is deployed and no maxHttpConnections value has been set, a default maxHttpConnections = -1 is added into the deployed configuration, and Journey Optimizer uses the default system value.
  • The service name in an endpoint configuration must be “action” or “dataSource”.
  • periodInMs takes an integer value greater than 0.
  • Wildcards are allowed in the endpoint URL.
  • A capping configuration is only active after calling the deploy endpoint.
  • A redeployment is required after updating an already deployed capping configuration.

Prerequisites and permissions:

  • To use the Postman collection, once the Postman Environment file is downloaded and uploaded into Postman, you need to add three variables: {JO_HOST} (the Journey Optimizer Gateway URL), {BASE_PATH} (the entry point for the API), and {SANDBOX_NAME} (the header x-sandbox-name, for example ‘prod’, corresponding to the sandbox name where the API operations take place).
  • The Postman Environment file is generated via Adobe I/O Console’s Integrations > Try it out > Download for Postman, with the selected integrations values.

Terminology:

  • Canonical name: Adobe Journey Optimizer — Acronym: AJO — variants: Journey Optimizer
  • Canonical name: Capping API — variants: capping API
  • Canonical name: canDeploy — variants: candeploy

FAQ:

  • When does a capping configuration become active? A capping configuration is only active after calling the deploy endpoint.
  • What happens when a capping configuration is created or updated? A check is automatically performed to guarantee the syntax and the integrity of the payload. If some problems occur, the operation returns warnings or errors to help you correct the configuration.
  • What does canDeploy return? When the canDeploy method is called, the process validates the configuration and returns the validation status “ok” or “error”.
  • What happens if maxHttpConnections is not set? The system may open up to multiple thousands of connections depending on the dynamic scaling of the system. At deployment, a default maxHttpConnections = -1 is added and Journey Optimizer uses the default system value.
  • Is a redeployment required after updating a deployed capping configuration? Yes. A redeployment is required after updating an already deployed configuration.
  • Can I undeploy and delete a deployed capping configuration in one API call? Yes. Use the delete call with the forceDelete parameter.
  • What do I do if ERR_AUTHORING_ENDPOINTCONFIG_2 appears when configuring a capping rule for a custom action? Make sure “action” (not “dataSource”) is set as the service name in the create or update payload.

Troubleshooting:

  • ERR_ENDPOINTCONFIG_100: capping config: missing or invalid url.
  • ERR_ENDPOINTCONFIG_101: capping config: malformed url.
  • ERR_ENDPOINTCONFIG_102: capping config: malformed url: wildchar in url not allowed in host:port.
  • ERR_ENDPOINTCONFIG_103: capping config: missing HTTP methods.
  • ERR_ENDPOINTCONFIG_104: capping config: no call rating defined.
  • ERR_ENDPOINTCONFIG_107: capping config: invalid max calls count (maxCallsCount).
  • ERR_ENDPOINTCONFIG_108: capping config: invalid max calls count (periodInMs).
  • ERR_ENDPOINTCONFIG_111: capping config: can't create endpoint config: invalid payload.
  • ERR_ENDPOINTCONFIG_112: capping config: can't create endpoint config: expecting a JSON payload.
  • ERR_AUTHORING_ENDPOINTCONFIG_1: invalid service name ...: must be 'dataSource' or 'action'.
  • ERR_AUTHORING_ENDPOINTCONFIG_2: endpoint not whitelisted: please contact your administrator. If this error appears when configuring a capping rule for a custom action, make sure “action” (not “dataSource”) is set as the service name in the create or update payload.
  • ERR_ENDPOINTCONFIG_106 (warning): capping config: max HTTP connections not defined: no limitation by default.

Examples:

  • Endpoint capping configuration for the action service: URL https://api.example.org/data/2.5/*, method GET, rating with maxCallsCount 500 and periodInMs 1000.

Personas:

  • developer: Can list, create, retrieve, update, delete, deploy and undeploy endpoint capping configurations with the Capping API. Can check with canDeploy whether an endpoint capping configuration can be deployed. Can undeploy and delete a deployed configuration in one API call with the forceDelete parameter. The page states that the max value that can be set for maxHttpConnections is 400. Where: “Capping API description & Postman collection”.

Onboarding:

  • Level: Beginner
  • First minimal step: Call list to retrieve existing capping configurations.
  • Success check: When the canDeploy method is called, it returns the validation status “ok”.
recommendation-more-help
journey-optimizer-help