ルールの作成
post
/fscmRestApi/resources/11.13.18.05/spendClassificationRules
リクエスト
ヘッダー・パラメータ
- Metadata-Context:
REST APIがランタイム・カスタマイズをサポートしている場合、サービスのシェイプはランタイム中に変更される可能性があります。 RESTクライアントは、これらの変更から自身を分離したり、このヘッダーを指定して最新バージョンのAPIと対話することを選択できます。 たとえば: Metadata-Context:sandbox="TrackEmployeeFeature".
- REST-Framework-Version:
RESTクライアントとサービスの間のプロトコル・バージョン。 クライアントがリクエストでこのヘッダーを指定しない場合、サーバーはAPIのデフォルト・バージョンを選択します。
- Upsert-Mode:
次のいずれかの値が含まれます: trueまたはfalse。 trueの場合、サーバーは作成操作ではなくアップサート操作を実行します。 アップサート操作中、サーバーはペイロードに一致する既存のリソースを検索しようとします。 一致が見つかった場合、サーバーは新しいリソースを作成するのではなく、既存のリソースを更新します。 見つからないかfalse (デフォルト)の場合、サーバーは作成操作を実行します。 アップサート操作は有効日RESTリソースではサポートされていません。
サポートされているメディア・タイプ
- application/json
ルート・スキーマ : スキーマ
タイプ:
ソースを表示
object
-
ActionOnAttributeCode: string
最大長:
100
アクションが実行される属性を示す略称。 -
ActionType: string
最大長:
30
ルールに対して実行された処理のタイプ。 -
ApplicableDatasets: string
最大長:
1000
ルールが適用されるデータ・セットのリスト。 -
ApplicableKnowledgebases: string
最大長:
1000
ルールが適用されるナレッジ・ベースのリスト。 -
AssignmentTypeCode: string
最大長:
100
割当のタイプを示す略語。 -
AssignToAttributeCode: string
最大長:
100
値が別の属性に割り当てられている属性を示す略称です。 -
AssignToConstant: string
最大長:
100
定数値が別の属性に割り当てられていることを示す値です。 -
DatasetsScope: string
最大長:
30
ルールがすべてのデータ・セットまたは特定のデータ・セットに適用可能かどうかを示す値。 -
Description: string
最大長:
2000
ルールの説明。 -
EndDate: string (date)
ルールが非アクティブになる日付。
-
KnowledgebaseScope: string
最大長:
30
ルールがすべてのナレッジ・ベースまたは特定のナレッジ・ベースに適用可能かどうかを示す値。 -
LastUsedDate: string (date-time)
ルールが分類プロセスに最後に適用された日付。
-
ruleConditions: array Rule Conditions
タイトル:
Rule Conditions
ルール条件リソースは、Oracle Spend Classification Cloudのルールの条件を管理します。 -
RuleConditionType: string
最大長:
30
ルール条件のタイプ。 -
RuleId(required): integer (int64)
ルールを一意に識別する値。
-
RuleName(required): string
最大長:
200
ルールの名前。 -
RuleSequence(required): integer (int64)
ルールが分類プロセスに適用される順序を示す番号です。
-
RuleType(required): string
最大長:
30
ルールのタイプ。 -
StartDate: string (date)
ルールがアクティブになる日付。
ネストされたスキーマ : ルール条件
タイプ:
array
タイトル:
Rule Conditions
ルール条件リソースは、Oracle Spend Classification Cloudのルールの条件を管理します。
ソースを表示
ネストされたスキーマ : spendClassificationRules-ruleConditions-item-post-request
タイプ:
ソースを表示
object
-
AttributeCode: string
最大長:
100
条件の定義に使用される属性を示す略称です。 -
OperatorCode: string
最大長:
30
条件の定義に使用される演算子を示す略称です。 -
RuleConditionId: integer
ルール条件を一意に識別する値。
-
Value: string
最大長:
2000
条件の定義に使用される文字列を示す値。
レスポンス
サポートされているメディア・タイプ
- application/json
デフォルトのレスポンス
次の表では、このタスクに対するデフォルトのレスポンスについて説明します。
ヘッダー
- Metadata-Context(required):
REST APIがランタイム・カスタマイズをサポートしている場合、サービスのシェイプはランタイム中に変更される可能性があります。 RESTクライアントは、これらの変更から自身を分離したり、このヘッダーを指定して最新バージョンのAPIと対話することを選択できます。 たとえば: Metadata-Context:sandbox="TrackEmployeeFeature".
- REST-Framework-Version(required):
RESTクライアントとサービスの間のプロトコル・バージョン。 クライアントがリクエストでこのヘッダーを指定しない場合、サーバーはAPIのデフォルト・バージョンを選択します。
ルート・スキーマ : spendClassificationRules-item-response
タイプ:
ソースを表示
object
-
ActionOnAttribute: string
読取り専用:
true
最大長:80
処理が実行される属性を示す値です。 -
ActionOnAttributeCode: string
最大長:
100
アクションが実行される属性を示す略称。 -
ActionType: string
最大長:
30
ルールに対して実行された処理のタイプ。 -
ApplicableDatasets: string
最大長:
1000
ルールが適用されるデータ・セットのリスト。 -
ApplicableKnowledgebases: string
最大長:
1000
ルールが適用されるナレッジ・ベースのリスト。 -
AssignmentType: string
読取り専用:
true
最大長:80
アサイメントのタイプ。 -
AssignmentTypeCode: string
最大長:
100
割当のタイプを示す略語。 -
AssignToAttribute: string
読取り専用:
true
最大長:80
値が別の属性に割り当てられている属性を示す値。 -
AssignToAttributeCode: string
最大長:
100
値が別の属性に割り当てられている属性を示す略称です。 -
AssignToConstant: string
最大長:
100
定数値が別の属性に割り当てられていることを示す値です。 -
DatasetsScope: string
最大長:
30
ルールがすべてのデータ・セットまたは特定のデータ・セットに適用可能かどうかを示す値。 -
Description: string
最大長:
2000
ルールの説明。 -
EndDate: string (date)
ルールが非アクティブになる日付。
-
KnowledgebaseScope: string
最大長:
30
ルールがすべてのナレッジ・ベースまたは特定のナレッジ・ベースに適用可能かどうかを示す値。 -
LastUsedDate: string (date-time)
ルールが分類プロセスに最後に適用された日付。
-
links: array Links
タイトル:
Links
リソース・インスタンスに関連付けられたリンク関係。 -
ruleConditions: array Rule Conditions
タイトル:
Rule Conditions
ルール条件リソースは、Oracle Spend Classification Cloudのルールの条件を管理します。 -
RuleConditionType: string
最大長:
30
ルール条件のタイプ。 -
RuleId: integer (int64)
ルールを一意に識別する値。
-
RuleName: string
最大長:
200
ルールの名前。 -
RuleSequence: integer (int64)
ルールが分類プロセスに適用される順序を示す番号です。
-
RuleType: string
最大長:
30
ルールのタイプ。 -
StartDate: string (date)
ルールがアクティブになる日付。
-
Status: string
読取り専用:
true
最大長:1
ルールのステータス。
ネストされたスキーマ : ルール条件
タイプ:
array
タイトル:
Rule Conditions
ルール条件リソースは、Oracle Spend Classification Cloudのルールの条件を管理します。
ソースを表示
ネストされたスキーマ : リンク
タイプ:
ソースを表示
object
-
href: string
タイトル:
hyperlink reference
関連リソースへのURI。 -
kind: string
タイトル:
kind
許可された値:[ "collection", "item", "describe", "other" ]
関連リソースの種類。 -
name: string
タイトル:
name
関連リソースへのリンクの名前。 -
properties: object properties
-
rel: string
タイトル:
relation
許可された値:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
リソース・インスタンスとの関係の名前。 例: self.
ネストされたスキーマ : spendClassificationRules-ruleConditions-item-response
タイプ:
ソースを表示
object
-
AttributeCode: string
最大長:
100
条件の定義に使用される属性を示す略称です。 -
AttributeValue: string
読取り専用:
true
最大長:80
条件の定義に使用される属性を示す値。 -
links: array Links
タイトル:
Links
リソース・インスタンスに関連付けられたリンク関係。 -
OperatorCode: string
最大長:
30
条件の定義に使用される演算子を示す略称です。 -
OperatorValue: string
読取り専用:
true
最大長:80
条件の定義に使用される演算子を示す値です。 -
RuleConditionId: integer
ルール条件を一意に識別する値。
-
Value: string
最大長:
2000
条件の定義に使用される文字列を示す値。
リンク
- ruleConditions
-
パラメータ:
- RuleId:
$request.path.RuleId
ルール条件リソースは、Oracle Spend Classification Cloudのルールの条件を管理します。 - RuleId:
例
この例では、ルールの作成方法について説明します。
cURLコマンドの例
次のcURLコマンドを使用して、RESTリソースに対するリクエストを送信します。
curl -u user:password -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -X POST -d 'request payload' https://servername/fscmRestApi/resources/11.13.18.05/spendClassificationRules
リクエスト本文の例
次の例では、リクエスト本文のコンテンツをJSON形式で含めます:
"{ ""RuleName"": ""RuleTATA1053"", ""Description"": ""RuleTATA10445"", ""RuleType"": ""POST"", ""StartDate"": ""2021-02-01"", ""EndDate"": ""2021-03-01"", ""LastUsedDate"": null, ""ActionType"": ""EXCLUDE"", ""ActionOnAttributeCode"": ""ORA_POI_ITEM_CODE"", ""AssignmentTypeCode"": ""CONSTANT"", ""AssignToAttributeCode"": null, ""AssignToConstant"": ""AS18940"", ""DatasetsScope"": ""LIST"", ""ApplicableDatasets"": ""TATAPOSET1"", ""KnowledgebaseScope"": ""LIST"", ""ApplicableKnowledgebases"": ""TATAKWP01"", ""RuleSequence"": 278, ""RuleConditionType"": ""ALL"", ""ruleConditions"": [ { ""AttributeCode"": ""ORA_POI_SUPPLIER_NAME"", ""OperatorCode"": ""LIKE"", ""Value"": ""SC_Supplier_02"" } ] }"
レスポンス本文の例
次の例には、レスポンス本文の内容がJSON形式で含まれます:
{ "RuleId": 4006, "RuleName": "RuleTATA1053", "Description": "RuleTATA10445", "RuleType": "POST", "Status": null, "StartDate": "2021-02-01", "EndDate": "2021-03-01", "LastUsedDate": null, "ActionType": "EXCLUDE", "ActionOnAttributeCode": "ORA_POI_ITEM_CODE", "ActionOnAttribute": null, "AssignmentTypeCode": "CONSTANT", "AssignmentType": null, "AssignToAttributeCode": null, "AssignToAttribute": null, "AssignToConstant": "AS18940", "DatasetsScope": "LIST", "ApplicableDatasets": "TATAPOSET1", "KnowledgebaseScope": "LIST", "ApplicableKnowledgebases": "TATAKWP01", "RuleSequence": 278, "RuleConditionType": "ALL", "ruleConditions": [ { "AttributeCode": "ORA_POI_SUPPLIER_NAME", "AttributeValue": null, "OperatorCode": "LIKE", "OperatorValue": null, "Value": "SC_Supplier_02", "RuleConditionId": 6003, "links": [ { "rel": "self", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006/child/ruleConditions/6003", "name": "ruleConditions", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel": "canonical", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006/child/ruleConditions/6003", "name": "ruleConditions", "kind": "item" }, { "rel": "parent", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006", "name": "spendClassificationRules", "kind": "item" } ] } ], "links": [ { "rel": "self", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006", "name": "spendClassificationRules", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel": "canonical", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006", "name": "spendClassificationRules", "kind": "item" }, { "rel": "child", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006/child/ruleConditions", "name": "ruleConditions", "kind": "collection" } ] }