機械翻訳について

推奨のIDによる結果をプレビューします。

post

/content/preview/api/v1.1/personalization/recommendationResults/.by.id/{id}

推奨IDで指定された推奨の結果をプレビューします。 このエンドポイントは、推奨事項で定義されたオーディエンス属性の値を指定することで、推奨事項を実行およびプレビューするために使用されます。

オーディエンス属性は、次のようにキーワードattributeの前に追加される名前と値のペアとして問合せパラメータの一部として指定する必要があります: attribute.\.\ = \

例: ?attribute.custom.my Attribute1=value1&attribute.custom.myAttribute2=value2



複数値オーディエンス属性が許可される場合は、名前と値のペアを繰り返すことで、これらの属性を問合せで指定する必要があります。


例: ?attribute.custom.myMultiValue=value1&attribute.custom.myMultiValue=value2など。

ノート:タクソノミ関連情報は、タクソノミが指定したチャネルに公開されるまで表示されませんが、タクソノミのプロモート済バージョンのルールを使用してカテゴリ化されたアセットをフィルタリングし、カテゴリが許可されます

リクエスト

パス・パラメータ
問合せパラメータ
  • コレクション形式: multi
    オーディエンス属性のリスト。 特殊文字が存在する場合は、encoded.Theオーディエンス属性にキーワードattributeをプレフィクスとして付ける必要があります :

    attribute.\.\ = \

    例: ? attribute.custom.myAttribute1 =value1& attribute.custom.myAttribute2 =value2

  • ターゲット・チャネルのチャネル・トークン。 チャネル・トークンは、問合せパラメータまたはリクエスト・ヘッダーのいずれかとして提供する必要があります。
  • fieldsパラメータは、照会されたアイテムの返されるフィールドと値を制御するために使用されます。 このパラメータは、コンマで区切られたフィールド名または「すべて」のリストを受け入れます。 すべてのユーザー定義フィールド名にプレフィクスfieldsを付け、その後にピリオド(。)を付ける必要があります。 これらのフィールドは照会された各アイテムごとに返されます。 すべてのフィールド名で大文字と小文字が区別されるため、ユーザーは検索問合せで正しいフィールド名を指定する必要があります。 フィールドが「すべて」 (大/小文字区別なし)として指定されている場合、タイプ固有の問合せの場合は、すべての標準フィールド、および大規模テキスト、json、ロケーション・データ型以外のユーザー定義フィールドが問合せ対象の各アイテムに対して戻されます。一方、すべてのタイプに対する問合せの場合は、すべての標準フィールドのみが戻されます。 標準フィールドidとtypeは常にレスポンスで返され、フィルタリングすることはできません。 このパラメータは問合せではオプションで、デフォルトでは問合せ結果にはID、名前、説明、およびタイプのみがレスポンスに表示されます。 問合せで指定された不正または無効なフィールド名は無視されます。

    ブレース・スタイルのクロス・タイプ問合せのコンテキストでは、構文name,{typename1:fields.userdefinedfieldname1, fields.userdefinedfieldname2},{typename2:fields.userdefinedfieldname1}を使用してタイプ固有のフィールドを指定できます。前述の例では、typename1タイプのすべてのアイテムにフィールドがあります - 名前、userdefinedfieldname1およびuserdefinedfieldname2。typename2タイプのすべてのアイテムにはフィールドが含まれます - 名前、userdefinedfieldname1。
    型付きフィールド句で参照されているタイプにクロス・タイプの問合せが解決されない場合、エラーがスローされます。 : ?q=(type eq "LocationType") &fields= fields.state, fields.country,updatedDate
    これにより、stateおよびcountryフィールドを含むLocationTypeの検索結果で、ID、タイプ、状態、国、updatedDateが返されます。

    : ?q=(type eq "LocationType") &fields=all
    これにより、すべての標準フィールドと、largetext、json、locationデータ型を除くすべてのユーザー定義フィールドが返されます
    : ?fields=all
    タイプは検索問合せで使用されないため(グローバル問合せとして動作する)標準フィールド(id、type、typeCategory、name、description、slug、language、createdDate、updatedDate、taxonomies、renditions)のみが返されます
    デフォルト値: name,description
  • このパラメータは、負でない整数を受け入れ、結果のサイズの制御に使用します。 制限に使用できる最大値は500です。
    デフォルト値: 100
  • レスポンス行の開始インデックス。
    デフォルト値: 0
  • ブール値を受け入れます。 この値は常にtrueに設定され、レスポンスの合計結果が表示されます。
    デフォルト値: true
本文()
オーディエンス属性名と値のペアの配列。 これらは、推奨事項の入力として使用されます。

属性エントリは、単一の値として指定できます:
" \.\ " : " \ "
また、複数値属性の場合は、配列として:
" \.\ " : [" \ ", " \ ", ... ]

ノート:問合せで指定されたオーディエンス属性は、本文で指定されたオーディエンス属性をオーバーライドします。
推奨のプレビューの場合、アセット状態の有効な値のみがPREVIEWです
ルート・スキーマ : RecommendationTest
型: object
推奨テスト
Show Source
  • 許容値: [ "PUBLISHED", "ALL", "PREVIEW" ]
    公開されたアセットのみを推奨のテストで返すかどうかを決定するために使用される列挙。 検証値は、ALLおよびPUBLISHEDです。 デフォルト値はALLeです。
  • audienceAttributes
    許可される追加プロパティ: additionalProperties
    推奨のテストに使用するオーディエンス属性の配列。 各属性には、次の単一の値を指定できます:
    "\.\" : "\"
    または複数値属性の配列として:
    "\.\" : ["\", "\" ... ]
ネストされたスキーマ : audienceAttributes
型: object
使用可能なその他のプロパティ
Show Source
推奨のテストに使用するオーディエンス属性の配列。 各属性には、次の単一の値を指定できます:
"\.\" : "\"
または複数値属性の配列として:
"\.\" : ["\", "\" ... ]
ネストされたスキーマ : additionalProperties
型: array
Show Source
トップに戻る

レスポンス

サポートされているメディア・タイプ

200レスポンス

操作の成功
本文()
ルート・スキーマ : CollectionProperties
型: object
CollectionProperties.
Show Source
ネストされたスキーマ : aggregationResults
型: array
集計結果。
Show Source
ネストされたスキーマ: items
型: array
コレクションに含まれる特異なリソース。
Show Source
ネストされたスキーマ : 殺害
型: array
固定品目。 検索リストの上部に固定されたアイテムを表示
Show Source
ネストされたスキーマ: properties
型: object
使用可能なその他のプロパティ
Show Source
追加のコレクション・プロパティ。
ネストされたスキーマ : AggregationResult
型: object
Show Source
ネストされたスキーマ: items
型: object
ネストされたスキーマ : additionalProperties
型: object

400レスポンス

不正リクエスト。 サーバーは、不正な構文、無効なデータまたはメッセージ・フレーミングのために、クライアント側でリクエストを処理できません。

403レスポンス

禁止。 クライアントはこのリクエストを実行する権限がありません。

500レスポンス

内部サーバー・エラー システムで予期しないエラーが発生しました。
トップに戻る

例1:

次の例は、cURLを使用してRESTリソースに対するPOSTリクエストを送信して、IDによる推奨をプレビューする方法を示しています:

curl -X POST -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?attribute.custom.attribute-ts-1=Single value&channelToken=b1230e5b0e7f4e998d586391ca1647da&fields=all'

このプレビューはIDの推奨事項です: RECO9DAF2D6B079140589709992EC922A5B9、channelToken: b1230e5b0e7f4e998d586391ca1647da. ルールに一致するURLにオーディエンス属性が指定されています。

リクエスト・ペイロード

{
        "audienceAttributes": {
        },
        "assetState": "PREVIEW"
 }

レスポンス本文

{
        "hasMore": false,
        "offset": 0,
        "count": 2,
        "limit": 2,
        "totalResults": 2,
        "items": [
          {
            "description": "Complex item - 278890853097008",
            "language": "en-US",
            "updatedDate": {
              "value": "2021-10-28T11:18:29.112Z",
              "timezone": "UTC"
            },
            "mimeType": "contentItem",
            "type": "278799601349002-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "createdDate": {
              "value": "2021-10-28T11:18:19.541Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem3ComplexType-278890853059007",
            "renditions": {
              "items": []
            },
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/CORE05B1B553E20B46DC8A1ACE333958BBB1?channelToken=b1230e5b0e7f4e998d586391ca1647da",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "id": "CORE05B1B553E20B46DC8A1ACE333958BBB1",
            "fileGroup": "contentItem",
            "fields": {
              "Text_single_1": "Single value",
              "Number_1": 111,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "Decimal_1": 1.11,
              "Boolean_1": true
            },
            "slug": "3000000010216-contentitem3complextype-278890853059007"
          },
          {
            "description": "Complex item - 278862344909006",
            "language": "en-US",
            "updatedDate": {
              "value": "2021-10-28T11:18:57.169Z",
              "timezone": "UTC"
            },
            "mimeType": "contentItem",
            "type": "278799601349002-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "createdDate": {
              "value": "2021-10-28T11:18:19.101Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem2ComplexTypePub-278862344860005",
            "renditions": {
              "items": []
            },
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/CORE84C77C63C8DF4A80A26599B1B0FB964F?channelToken=b1230e5b0e7f4e998d586391ca1647da",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "id": "CORE84C77C63C8DF4A80A26599B1B0FB964F",
            "fileGroup": "contentItem",
            "fields": {
              "Text_single_1": "Single value",
              "Number_1": 111,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "Decimal_1": 1.11,
              "Boolean_1": true
            },
            "slug": "3000000010215-contentitem2complextypepub-278862344860005"
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?attribute.custom.attribute-ts-1=Single value&channelToken=b1230e5b0e7f4e998d586391ca1647da&fields=all",
            "rel": "self",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?attribute.custom.attribute-ts-1=Single value&channelToken=b1230e5b0e7f4e998d586391ca1647da&fields=all",
            "rel": "canonical",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?channelToken=b1230e5b0e7f4e998d586391ca1647da",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?attribute.custom.attribute-ts-1=Single value&channelToken=b1230e5b0e7f4e998d586391ca1647da&fields=all&offset=0",
            "rel": "first",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?attribute.custom.attribute-ts-1=Single value&channelToken=b1230e5b0e7f4e998d586391ca1647da&fields=all&offset=0",
            "rel": "last",
            "method": "POST",
            "mediaType": "application/json"
          }
        ]
      }

例2:

curl -X POST -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?attribute.custom.attribute-ts-1=WillNeverMatch&channelToken=b1230e5b0e7f4e998d586391ca1647da&fields=all'

このプレビューはIDの推奨事項です: RECOF7E733CC021B4D968D9F9B25E7151F03、channelToken: b1230e5b0e7f4e998d586391ca1647da. URLにオーディエンス属性が指定され、ルールが一致しないため、デフォルトが返されます。

リクエスト・ペイロード

{
        "audienceAttributes": {
        },
        "assetState": "PREVIEW"
    },

レスポンス本文

{
        "hasMore": false,
        "offset": 0,
        "count": 2,
        "limit": 2,
        "totalResults": 2,
        "items": [
          {
            "description": "Complex item - 278857744875004",
            "language": "en-US",
            "updatedDate": {
              "value": "2021-10-28T11:19:09.889Z",
              "timezone": "UTC"
            },
            "mimeType": "contentItem",
            "type": "278799601349002-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "createdDate": {
              "value": "2021-10-28T11:18:16.312Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem1ComplexTypePub-278857744819003",
            "renditions": {
              "items": []
            },
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/COREBE5441D25AF4449CA58430AC33587B74?channelToken=b1230e5b0e7f4e998d586391ca1647da",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "id": "COREBE5441D25AF4449CA58430AC33587B74",
            "fileGroup": "contentItem",
            "fields": {
              "Text_single_1": "ZZZZZZ",
              "Number_1": 111,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "Decimal_1": 1.11,
              "Boolean_1": true
            },
            "slug": "3000000010214-contentitem1complextypepub-278857744819003"
          },
          {
            "description": "Complex item - 278897517017002",
            "language": "en-US",
            "updatedDate": {
              "value": "2021-10-28T11:18:34.754Z",
              "timezone": "UTC"
            },
            "mimeType": "contentItem",
            "type": "278799601349002-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "createdDate": {
              "value": "2021-10-28T11:18:20.214Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem5ComplexTypePub-278897516976001",
            "renditions": {
              "items": []
            },
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/CORE3E0B1C2E479B43E3A42A0955ED5A79DC?channelToken=b1230e5b0e7f4e998d586391ca1647da",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "id": "CORE3E0B1C2E479B43E3A42A0955ED5A79DC",
            "fileGroup": "contentItem",
            "fields": {
              "Text_single_1": "Single value",
              "Number_1": 111,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "Decimal_1": 1.11,
              "Boolean_1": true
            },
            "slug": "3000000010218-contentitem5complextypepub-278897516976001"
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?attribute.custom.attribute-ts-1=WillNeverMatch&channelToken=b1230e5b0e7f4e998d586391ca1647da&fields=all",
            "rel": "self",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?attribute.custom.attribute-ts-1=WillNeverMatch&channelToken=b1230e5b0e7f4e998d586391ca1647da&fields=all",
            "rel": "canonical",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?channelToken=b1230e5b0e7f4e998d586391ca1647da",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?attribute.custom.attribute-ts-1=WillNeverMatch&channelToken=b1230e5b0e7f4e998d586391ca1647da&fields=all&offset=0",
            "rel": "first",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?attribute.custom.attribute-ts-1=WillNeverMatch&channelToken=b1230e5b0e7f4e998d586391ca1647da&fields=all&offset=0",
            "rel": "last",
            "method": "POST",
            "mediaType": "application/json"
          }
        ]
      }

例3:

curl -X POST -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECOG7E733CC021B4D968D9F9B25E7151F09?fields=all&channelToken=b1230e5b0e7f4e998d586391ca1647da'

このプレビューはIDの推奨事項です: RECOG7E733CC021B4D968D9F9B25E7151F09、channelToken: b1230e5b0e7f4e998d586391ca1647da. オーディエンス属性は、ルールに一致するリクエストの本文に指定されます。

リクエスト・ペイロード

{
        "audienceAttributes": {
          "custom.attribute-bool-1": [
            "Another single onezzz",
            "And this alsozzz"
          ],
          "custom.attribute-ts-1": [
            "Another single one",
            "And this also"
          ]
        },
        "assetState": "PREVIEW"
      },

レスポンス本文

{
        "hasMore": false,
        "offset": 0,
        "count": 2,
        "limit": 2,
        "totalResults": 2,
        "items": [
          {
            "description": "Complex item - 278890853097008",
            "language": "en-US",
            "updatedDate": {
              "value": "2021-10-28T11:19:57.100Z",
              "timezone": "UTC"
            },
            "mimeType": "contentItem",
            "type": "278799601349002-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "createdDate": {
              "value": "2021-10-28T11:18:19.541Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem3ComplexType-278890853059007",
            "renditions": {
              "items": []
            },
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/CORE05B1B553E20B46DC8A1ACE333958BBB1?channelToken=b1230e5b0e7f4e998d586391ca1647da",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "id": "CORE05B1B553E20B46DC8A1ACE333958BBB1",
            "fileGroup": "contentItem",
            "fields": {
              "Text_single_1": "Another single one",
              "Number_1": 222,
              "Text_multi_1": [
                "Ggg hhh iii",
                "Jjj kkk lll"
              ],
              "Decimal_1": 2.22,
              "Boolean_1": false
            },
            "slug": "3000000010216-contentitem3complextype-278890853059007"
          },
          {
            "description": "Complex item - 278894031582000",
            "language": "en-US",
            "updatedDate": {
              "value": "2021-10-28T11:19:57.750Z",
              "timezone": "UTC"
            },
            "mimeType": "contentItem",
            "type": "278799601349002-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "createdDate": {
              "value": "2021-10-28T11:18:19.885Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem4ComplexTypePub-278894031536009",
            "renditions": {
              "items": []
            },
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/CORE9272086F9EC046F5879E6343F2933D15?channelToken=b1230e5b0e7f4e998d586391ca1647da",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "id": "CORE9272086F9EC046F5879E6343F2933D15",
            "fileGroup": "contentItem",
            "fields": {
              "Text_single_1": "And this also",
              "Number_1": 333,
              "Text_multi_1": [
                "Mmm nnn ooo",
                "Ppp qqq rrr"
              ],
              "Decimal_1": 3.33,
              "Boolean_1": false
            },
            "slug": "3000000010217-contentitem4complextypepub-278894031536009"
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECOG7E733CC021B4D968D9F9B25E7151F09?fields=all&channelToken=b1230e5b0e7f4e998d586391ca1647da",
            "rel": "self",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECOG7E733CC021B4D968D9F9B25E7151F09?fields=all&channelToken=b1230e5b0e7f4e998d586391ca1647da",
            "rel": "canonical",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/personalization/recommendationResults/.by.id/RECOG7E733CC021B4D968D9F9B25E7151F09?channelToken=b1230e5b0e7f4e998d586391ca1647da",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECOG7E733CC021B4D968D9F9B25E7151F09?fields=all&offset=0&channelToken=b1230e5b0e7f4e998d586391ca1647da",
            "rel": "first",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/personalization/recommendationResults/.by.id/RECOG7E733CC021B4D968D9F9B25E7151F09?fields=all&offset=0&channelToken=b1230e5b0e7f4e998d586391ca1647da",
            "rel": "last",
            "method": "POST",
            "mediaType": "application/json"
          }
        ]
      }
    }
  ]
}
トップに戻る