値リスト
値リスト(LOV)を使用して、国コード、郵便番号、都道府県名など、頻繁に使用される静的データを取得したり、リソース固有の値を取得できます。 LOVの値は、DESCRIBE
コールを介して取得できます。
APIのDESCRIBE
コールは、すべての属性、それらの属性の詳細、参照値および参照詳細のリストを返します。
次に、リソースURLの形式を示します。
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/accounts/describe
次に、JSON形式のレスポンス本文の例を示します。
{{ "Resources" : { "accounts" : { "discrColumnType" : false, "title" : "Account", "titlePlural" : "Accounts", "attributes" : [ { "name" : "PartyId", "type" : "integer", "updatable" : false, "mandatory" : true, "queryable" : true, "allowChanges" : "never", "precision" : 18, "hasDefaultValueExpression" : true, "title" : "Party ID", "annotations" : { "description" : "The unique identifier of the account." } }... { "name" : "Type", "type" : "string", "updatable" : true, "mandatory" : false, "queryable" : true, "allowChanges" : "always", "precision" : 30, "title" : "Type", "controlType" : "choice", "maxLength" : "30", "lov" : { "childRef" : "SalesProfileTypeLookupLOV", "attributeMap" : [ { "source" : "LookupCode", "target" : "Type" } ], "displayAttributes" : [ "Meaning" ], "lovResourcePath" : [ { "resource" : "fndStaticLookups", "filter" : "?finder=LookupTypeIsActiveEnabledFinder%3BBindLookupType%3DZCA_ACCOUNT_TYPE" } ] }, "annotations" : { "description" : "The account type that defines if the account is a sales account or a prospect or any other party type. The accepted values are defined in the lookup type ZCA_ACCOUNT_TYPE. It is defaulted to ZCA_CUSTOMER if no value is provided." } }, ... }
URLを導出して特定の値リストを取得するには、ペイロードの
lovResourcePath
セクションを参照してください。
childRef
: LOVの表示名が含まれます。resource
: 特定のLOVを含む最上位レベルのリソースが含まれます。filter
: 特定のファインダ名、ファインダ変数およびファインダ値が含まれます
たとえば、ファインダLookupTypeIsActiveEnabledFinder
、ファインダ変数BindLookupType
および参照タイプZCA_ACCOUNT_TYPE
を使用して、アカウント、見込み客または販売アカウントのタイプを取得できます。
次に、cURLコマンドの形式を示します。
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups?finder=LookupTypeIsActiveEnabledFinder;BindLookupType=ZCA_ACCOUNT_TYPE
次に、JSON形式のレスポンス本文の例を示します。
{ "items": [ { "LookupType": "ZCA_ACCOUNT_TYPE", "LookupCode": "ZCA_CUSTOMER", "Meaning": "Customer", "Description": null, "EnabledFlag": "Y", "StartDateActive": null, "EndDateActive": null, "DisplaySequence": 1, "CreatedBy": "SEED_DATA_FROM_APPLICATION", "CreationDate": "2013-10-24T23:05:27.018+00:00", "LastUpdateDate": "2018-05-16T02:26:14.623+00:00", "LastUpdateLogin": "-1", "LastUpdatedBy": "SEED_DATA_FROM_APPLICATION", "Tag": null, "links": [ { "rel": "self", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups/0002000000105A43415F4143434F554E545F545950450000000C5A43415F435553544F4D4552", "name": "fndStaticLookups", "kind": "item" }, { "rel": "canonical", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups/0002000000105A43415F4143434F554E545F545950450000000C5A43415F435553544F4D4552", "name": "fndStaticLookups", "kind": "item" } ] }, { "LookupType": "ZCA_ACCOUNT_TYPE", "LookupCode": "ZCA_PROSPECT", "Meaning": "Prospect", "Description": null, "EnabledFlag": "Y", "StartDateActive": null, "EndDateActive": null, "DisplaySequence": 2, "CreatedBy": "SEED_DATA_FROM_APPLICATION", "CreationDate": "2013-10-24T23:05:27.042+00:00", "LastUpdateDate": "2018-05-16T02:26:14.623+00:00", "LastUpdateLogin": "-1", "LastUpdatedBy": "SEED_DATA_FROM_APPLICATION", "Tag": null, "links": [ { "rel": "self", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups/0002000000105A43415F4143434F554E545F545950450000000C5A43415F50524F5350454354", "name": "fndStaticLookups", "kind": "item" }, { "rel": "canonical", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups/0002000000105A43415F4143434F554E545F545950450000000C5A43415F50524F5350454354", "name": "fndStaticLookups", "kind": "item" } ] } ], "count": 2, "hasMore": false, "limit": 25, "offset": 0, "links": [ { "rel": "self", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups", "name": "fndStaticLookups", "kind": "collection" } ] }
リソース固有のLOVの詳細は、次のトピックを参照してください。