機械翻訳について

投稿のあるプリファレンス・ヘッダー

Elastic Search Restサービスでは、プリファレンス・ヘッダーを受け入れて、問合せを一時的、格納、結果を返すか、それ自体に説明を返すかを定義します。

一時

問合せを保存せずにポストを使用した問合せには、一時プリファレンスが使用されます。 一時プリファレンスのある投稿ではページ区切りリンクは生成されません。

cURLコマンド

https://servername.fa.us2.oraclecloud.com/crmRestApi/searchResources/11.13.18.05/custom-actions/queries

リクエスト・ペイロードの例

{   
    "name":"demo json parser",
    "entity":"Account",
    "keywords":"parser",
    "sort": [{ "attribute":"PartyUniqueName","direction":"ascending"}],
    "fields":["PartyUniqueName","PrimaryAddress"],
    "q":{"op": "$all" , "attribute": "PartyUniqueName", "value": "Technologies United"},
    "excludeFields" : ["PrimaryIndustry"],
    "aggregations":{
        "PrimaryIndustry":{
            "ignore": true,
            "terms":{
                "attribute": "PrimaryIndustry",
                "maxNumberOfBuckets" : 5,
                "includeTerms":["1022","1012"],
                "excludeTerms":["1234"],
                "other": true,   
                "missing": true,
                "localize": true
            }
        },
        "CreationDate":{
            "ignore":true,
            "range":{
                "attribute":"CreationDate",
                "ranges":[
                    {"key": "ThisQuarter", "from": "now/m-3m", "to": "now"},
                    {"key": "NextQuarter", "from": "now", "to": "now/m+3m"},
                    {"key": "ThisYear", "from": "now/y", "to": "now/y+1y"},
                    {"key": "LastQuarter", "from": "now/m-6m", "to": "now/m-3m"},
                    {"key": "LastYear", "from": "now/y-1y", "to": "now/y"}
                ]
            }
        }
    },
    "keywordsFields":["PrimaryIndustry"],
    "applicationData": {
                "461e5791-9f15-4cd1-b5cd-19e8480cbce6":{"hello":{"Nice":"Work"}}
            },
    "highlights" : {
        "pre": ["<em>"],
        "post": ["</em>"]
        "fields":["PartyUniqueName"]
    }
}

保存済

ストアド・プリファレンスでは新しい問合せが作成され、結果の問合せが表示されます。

cURLコマンド

https://servername.fa.us2.oraclecloud.com/crmRestApi/searchResources/11.13.18.05/custom-actions/queries

リクエスト・ペイロードの例

{   
    "name":"demo json parser",
    "entity":"Account",
    "keywords":"parser",
    "sort": [{ "attribute":"PartyUniqueName","direction":"ascending"}],
    "fields":["PartyUniqueName","PrimaryAddress"],
    "q":{"op": "$all" , "attribute": "PartyUniqueName", "value": "Technologies United"},
    "excludeFields" : ["PrimaryIndustry"],
    "aggregations":{
        "PrimaryIndustry":{
            "ignore": true,
            "terms":{
                "attribute": "PrimaryIndustry",
                "maxNumberOfBuckets" : 5,
                "includeTerms":["1022","1012"],
                "excludeTerms":["1234"],
                "other": true,   
                "missing": true,
                "localize": true
            }
        },
        "CreationDate":{
            "ignore":true,
            "range":{
                "attribute":"CreationDate",
                "ranges":[
                    {"key": "ThisQuarter", "from": "now/m-3m", "to": "now"},
                    {"key": "NextQuarter", "from": "now", "to": "now/m+3m"},
                    {"key": "ThisYear", "from": "now/y", "to": "now/y+1y"},
                    {"key": "LastQuarter", "from": "now/m-6m", "to": "now/m-3m"},
                    {"key": "LastYear", "from": "now/y-1y", "to": "now/y"}
                ]
            }
        }
    },
    "keywordsFields":["PrimaryIndustry"],
    "applicationData": {
                "461e5791-9f15-4cd1-b5cd-19e8480cbce6":{"hello":{"Nice":"Work"}}
            },
    "highlights" : {
       "pre": ["<em>"],
       "post": ["</em>"],
       "fields":["PartyUniqueName"]
    }
}

問合せ結果

保存済検索を格納し、問合せ結果を返します。

cURLコマンド

https://servername.fa.us2.oraclecloud.com/crmRestApi/searchResources/11.13.18.05/custom-actions/queries

リクエスト・ペイロードの例

{   
    "name":"demo json parser",
    "entity":"Account",
    "keywords":"parser",
    "sort": [{ "attribute":"PartyUniqueName","direction":"ascending"}],
    "fields":["PartyUniqueName","PrimaryAddress"],
    "q":{"op": "$all" , "attribute": "PartyUniqueName", "value": "Technologies United"},
    "excludeFields" : ["PrimaryIndustry"],
    "aggregations":{
        "PrimaryIndustry":{
            "ignore": true,
            "terms":{
                "attribute": "PrimaryIndustry",
                "maxNumberOfBuckets" : 5,
                "includeTerms":["1022","1012"],
                "excludeTerms":["1234"],
                "other": true,   
                "missing": true,
                "localize": true
            }
        },
        "CreationDate":{
            "ignore":true,
            "range":{
                "attribute":"CreationDate",
                "ranges":[
                    {"key": "ThisQuarter", "from": "now/m-3m", "to": "now"},
                    {"key": "NextQuarter", "from": "now", "to": "now/m+3m"},
                    {"key": "ThisYear", "from": "now/y", "to": "now/y+1y"},
                    {"key": "LastQuarter", "from": "now/m-6m", "to": "now/m-3m"},
                    {"key": "LastYear", "from": "now/y-1y", "to": "now/y"}
                ]
            }
        }
    },
    "keywordsFields":["PrimaryIndustry"],
    "applicationData": {
                "461e5791-9f15-4cd1-b5cd-19e8480cbce6":{"hello":{"Nice":"Work"}}
            },
    "highlights" : {
        "pre": ["<em>"],
        "post": ["</em>"],
        "fields":["PartyUniqueName"]
    }
}