機械翻訳について

IDによる推奨から結果を取得します。

get

/content/published/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 etc.

リクエスト

パス・パラメータ
問合せパラメータ
  • コレクション形式: 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)のみが返されます
    : ?fields=name,createdDate
    タイプは検索問合せで使用されないため(グローバル問合せとして機能)、これは標準フィールド(ID、名前、createdDateおよびタイプなど)のみを返します
    デフォルト値: name,description
  • このパラメータは、負でない整数を受け入れ、結果のサイズの制御に使用します。 制限に使用できる最大値は500です。
    デフォルト値: 100
  • レスポンス行の開始インデックス。
    デフォルト値: 0
  • ブール値を受け入れます。 Trueに設定すると、レスポンスの結果フィールド合計が表示されます。
    デフォルト値: false
トップに戻る

レスポンス

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

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レスポンス

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

次の例は、IDを持つ公開済推奨結果を取得する方法を示しています。

curl -i -X GET -H "Accept:application/json" 'http://<hostname>/content/published/api/v1.1/personalization/recommendationResults/.by.id/{id}'
例1

推奨IDを持つ推奨結果を取得 : channelToken:4c37d9759b9c42a2a0fec12d7563f025を使用したRECO9DAF2D6B079140589709992EC922A5B9。

/content/published/api/v1.1/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?channelToken=4c37d9759b9c42a2a0fec12d7563f025&fields=all

レスポンス本文

{
        "hasMore": false,
        "offset": 0,
        "count": 2,
        "limit": 2,
        "totalResults": 2,
        "items": [
          {
            "createdDate": {
              "value": "2020-07-09T09:23:56.132Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem1ComplexTypePub-1984512446212008",
            "description": "Complex item - 1984512446307009",
            "typeCategory": "ContentType",
            "language": "en-US",
            "links": [
              {
                "href": "https://<hostname>/content/published/api/v1.1/items/COREF5E09688F7D14EA9BEE71048323C0AB3?channelToken=4c37d9759b9c42a2a0fec12d7563f025",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "id": "COREF5E09688F7D14EA9BEE71048323C0AB3",
            "updatedDate": {
              "value": "2020-07-09T09:23:56.132Z",
              "timezone": "UTC"
            },
            "type": "1984424437842003-testRecommendation-complexType",
            "fields": {
              "subdivision-1-code": "CA",
              "Text_single_1": "Single value",
              "Number_1": 211,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "City-name-1": "San Francisco",
              "Decimal_1": 1.11,
              "Date_1": {
                "value": "2019-01-01T01:00:00.001Z",
                "timezone": "UTC"
              },
              "Boolean_1": true,
              "subdivision-1-name": "California"
            },
            "slug": "1481786052033-contentitem1complextypepub-1984512446212008"
          },
          {
            "createdDate": {
              "value": "2020-07-09T09:23:56.132Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem2ComplexTypePub-1984526430280000",
            "description": "Complex item - 1984526430338001",
            "language": "en-US",
            "links": [
              {
                "href": "https://<hostname>/content/published/api/v1.1/items/COREBCB44A76F4BB4E7FB188FE1936303012?channelToken=4c37d9759b9c42a2a0fec12d7563f025",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "id": "COREBCB44A76F4BB4E7FB188FE1936303012",
            "updatedDate": {
              "value": "2020-07-09T09:23:56.132Z",
              "timezone": "UTC"
            },
            "type": "1984424437842003-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "fields": {
              "subdivision-1-code": "CA",
              "Text_single_1": "Single value",
              "Number_1": 311,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "City-name-1": "San Francisco",
              "Decimal_1": 1.11,
              "Date_1": {
                "value": "2019-01-01T01:00:00.001Z",
                "timezone": "UTC"
              },
              "Boolean_1": true,
              "subdivision-1-name": "California"
            },
            "slug": "1481786052042-contentitem2complextypepub-1984526430280000"
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/published/api/v1.1/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?fields=all&channelToken=4c37d9759b9c42a2a0fec12d7563f025",
            "rel": "self",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/published/api/v1.1/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?fields=all&channelToken=4c37d9759b9c42a2a0fec12d7563f025",
            "rel": "canonical",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/published/api/v1.1/metadata-catalog/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?channelToken=4c37d9759b9c42a2a0fec12d7563f025",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/published/api/v1.1/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?fields=all&offset=0&channelToken=4c37d9759b9c42a2a0fec12d7563f025",
            "rel": "first",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/published/api/v1.1/personalization/recommendationResults/.by.id/RECO9DAF2D6B079140589709992EC922A5B9?fields=all&offset=0&channelToken=4c37d9759b9c42a2a0fec12d7563f025",
            "rel": "last",
            "method": "GET",
            "mediaType": "application/json"
          }     
        
例2

推奨IDを持つ推奨結果を取得: RECOF7E733CC021B4D968D9F9B25E7151F03, channelTokenを使用: 7b75d02e298d44b0817ac540b98e89e3およびオーディエンス属性。

/content/published/api/v1.1/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?attribute.custom.attribute-ts-1=Single+value&channelToken=7b75d02e298d44b0817ac540b98e89e3&fields=all&attribute.custom.attribute-int-1=10

レスポンス本文

{
        "hasMore": false,
        "offset": 0,
        "count": 6,
        "limit": 6,
        "totalResults": 6,
        "items": [
          {
            "createdDate": {
              "value": "2020-07-09T09:24:03.490Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem6ComplexType-1984576426766008",
            "description": "Complex item - 1984576426845009",
            "language": "en-US",
            "links": [
              {
                "href": "https://<hostname>/content/published/api/v1.1/items/CORE41B5714CA50A446B864F363327021215?channelToken=7b75d02e298d44b0817ac540b98e89e3",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "updatedDate": {
              "value": "2020-07-09T09:24:03.490Z",
              "timezone": "UTC"
            },
            "id": "CORE41B5714CA50A446B864F363327021215",
            "type": "1984424437842003-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "fields": {
              "subdivision-1-code": "CA",
              "Text_single_1": "Single value",
              "Number_1": 711,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "City-name-1": "San Francisco",
              "Decimal_1": 1.11,
              "Date_1": {
                "value": "2019-01-01T01:00:00.001Z",
                "timezone": "UTC"
              },
              "Boolean_1": true,
              "subdivision-1-name": "California"
            },
            "slug": "1481786052078-contentitem6complextype-1984576426766008"
          },
          {
            "createdDate": {
              "value": "2020-07-09T09:24:03.490Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem5ComplexTypePub-1984563392421006",
            "description": "Complex item - 1984563392490007",
            "language": "en-US",
            "links": [
              {
                "href": "https://<hostname>/content/published/api/v1.1/items/CORE3195C2E6CA564B3B8B8825AE872408E2?channelToken=7b75d02e298d44b0817ac540b98e89e3",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "updatedDate": {
              "value": "2020-07-09T09:24:03.490Z",
              "timezone": "UTC"
            },
            "id": "CORE3195C2E6CA564B3B8B8825AE872408E2",
            "type": "1984424437842003-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "fields": {
              "subdivision-1-code": "CA",
              "Text_single_1": "Single value",
              "Number_1": 611,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "City-name-1": "San Francisco",
              "Decimal_1": 1.11,
              "Date_1": {
                "value": "2019-01-01T01:00:00.001Z",
                "timezone": "UTC"
              },
              "Boolean_1": true,
              "subdivision-1-name": "California"
            },
            "slug": "1481786052069-contentitem5complextypepub-1984563392421006"
          },
          {
            "createdDate": {
              "value": "2020-07-09T09:24:03.490Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem3ComplexType-1984537958974002",
            "description": "Complex item - 1984537959031003",
            "language": "en-US",
            "links": [
              {
                "href": "https://<hostname>/content/published/api/v1.1/items/CORE2512057F40DE4DE49E8EA289098B52BF?channelToken=7b75d02e298d44b0817ac540b98e89e3",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "updatedDate": {
              "value": "2020-07-09T09:24:03.490Z",
              "timezone": "UTC"
            },
            "id": "CORE2512057F40DE4DE49E8EA289098B52BF",
            "type": "1984424437842003-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "fields": {
              "subdivision-1-code": "CA",
              "Text_single_1": "Single value",
              "Number_1": 411,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "City-name-1": "San Francisco",
              "Decimal_1": 1.11,
              "Date_1": {
                "value": "2019-01-01T01:00:00.001Z",
                "timezone": "UTC"
              },
              "Boolean_1": true,
              "subdivision-1-name": "California"
            },
            "slug": "1481786052051-contentitem3complextype-1984537958974002"
          },
          {
            "createdDate": {
              "value": "2020-07-09T09:29:26.577Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem2ComplexTypePub-1984526430280000",
            "description": "Complex item - 1984526430338001",
            "language": "en-US",
            "links": [
              {
                "href": "https://<hostname>/content/published/api/v1.1/items/COREBCB44A76F4BB4E7FB188FE1936303012?channelToken=7b75d02e298d44b0817ac540b98e89e3",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "updatedDate": {
              "value": "2020-07-09T09:29:26.577Z",
              "timezone": "UTC"
            },
            "id": "COREBCB44A76F4BB4E7FB188FE1936303012",
            "type": "1984424437842003-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "fields": {
              "subdivision-1-code": "CA",
              "Text_single_1": "Single value",
              "Number_1": 311,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "City-name-1": "San Francisco",
              "Decimal_1": 1.11,
              "Date_1": {
                "value": "2019-01-01T01:00:00.001Z",
                "timezone": "UTC"
              },
              "Boolean_1": true,
              "subdivision-1-name": "California"
            },
            "slug": "1481786052042-contentitem2complextypepub-1984526430280000"
          },
          {
            "createdDate": {
              "value": "2020-07-09T09:24:03.490Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem4ComplexTypePub-1984550886423004",
            "description": "Complex item - 1984550886495005",
            "language": "en-US",
            "links": [
              {
                "href": "https://<hostname>/content/published/api/v1.1/items/CORE4676E5C2AA1442B18102A2027A923E22?channelToken=7b75d02e298d44b0817ac540b98e89e3",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "updatedDate": {
              "value": "2020-07-09T09:24:03.490Z",
              "timezone": "UTC"
            },
            "id": "CORE4676E5C2AA1442B18102A2027A923E22",
            "type": "1984424437842003-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "fields": {
              "subdivision-1-code": "CA",
              "Text_single_1": "Single value",
              "Number_1": 511,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "City-name-1": "San Francisco",
              "Decimal_1": 1.11,
              "Date_1": {
                "value": "2019-01-01T01:00:00.001Z",
                "timezone": "UTC"
              },
              "Boolean_1": true,
              "subdivision-1-name": "California"
            },
            "slug": "1481786052060-contentitem4complextypepub-1984550886423004"
          },
          {
            "createdDate": {
              "value": "2020-07-09T09:29:26.577Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "contentItem1ComplexTypePub-1984512446212008",
            "description": "Complex item - 1984512446307009",
            "language": "en-US",
            "links": [
              {
                "href": "https://<hostname>/content/published/api/v1.1/items/COREF5E09688F7D14EA9BEE71048323C0AB3?channelToken=7b75d02e298d44b0817ac540b98e89e3",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "updatedDate": {
              "value": "2020-07-09T09:29:26.577Z",
              "timezone": "UTC"
            },
            "id": "COREF5E09688F7D14EA9BEE71048323C0AB3",
            "type": "1984424437842003-testRecommendation-complexType",
            "typeCategory": "ContentType",
            "fields": {
              "subdivision-1-code": "CA",
              "Text_single_1": "Single value",
              "Number_1": 211,
              "Text_multi_1": [
                "Aaa bbb ccc",
                "Ddd eee fff"
              ],
              "City-name-1": "San Francisco",
              "Decimal_1": 1.11,
              "Date_1": {
                "value": "2019-01-01T01:00:00.001Z",
                "timezone": "UTC"
              },
              "Boolean_1": true,
              "subdivision-1-name": "California"
            },
            "slug": "1481786052033-contentitem1complextypepub-1984512446212008"
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/published/api/v1.1/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?attribute.custom.attribute-ts-1=Single value&channelToken=7b75d02e298d44b0817ac540b98e89e3&fields=all&attribute.custom.attribute-int-1=10",
            "rel": "self",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/published/api/v1.1/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?attribute.custom.attribute-ts-1=Single value&channelToken=7b75d02e298d44b0817ac540b98e89e3&fields=all&attribute.custom.attribute-int-1=10",
            "rel": "canonical",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/published/api/v1.1/metadata-catalog/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?channelToken=7b75d02e298d44b0817ac540b98e89e3",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/published/api/v1.1/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?attribute.custom.attribute-ts-1=Single value&channelToken=7b75d02e298d44b0817ac540b98e89e3&fields=all&offset=0&attribute.custom.attribute-int-1=10",
            "rel": "first",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/published/api/v1.1/personalization/recommendationResults/.by.id/RECOF7E733CC021B4D968D9F9B25E7151F03?attribute.custom.attribute-ts-1=Single value&channelToken=7b75d02e298d44b0817ac540b98e89e3&fields=all&offset=0&attribute.custom.attribute-int-1=10",
            "rel": "last",
            "method": "GET",
            "mediaType": "application/json"
          }
        ]
      }
    }    
  ]
トップに戻る