REST/JSON Examples¶
create_flow.json¶
{
"objectType": "FLOW",
"tagUpdates": [
{
"attrName": "flow_type",
"value": { "stringValue": "account_simulation" }
},
{
"attrName": "portfolio",
"value": { "stringValue": "credit_cards" }
},
{
"attrName": "brand",
"value": {"stringValue": "ACME Financial" }
},
{
"attrName": "last_review_date",
"value" : { "dateValue": { "isoDate": "2020-06-04" } }
}
],
"definition": {
"objectType": "FLOW",
"flow": {
"nodes": {
"customer_accounts": {
"nodeType": "INPUT_NODE"
},
"economic_scenario": {
"nodeType": "INPUT_NODE"
},
"simulate_customer_transactions": {
"nodeType": "MODEL_NODE",
"inputs": [ "initial_accounts", "economic_scenario" ],
"outputs": [ "simulated_accounts" ]
},
"simulate_joiners_and_leavers": {
"nodeType": "MODEL_NODE",
"inputs": [ "initial_accounts" ],
"outputs": [ "simulated_accounts" ]
},
"simulated_accounts": {
"nodeType": "OUTPUT_NODE"
}
},
"edges": [
{
"target": { "node": "simulate_customer_transactions", "socket": "initial_accounts" },
"source": { "node": "customer_accounts" }
},
{
"target": { "node": "simulate_customer_transactions", "socket": "economic_scenario" },
"source": { "node": "economic_scenario" }
},
{
"target": { "node": "simulate_joiners_and_leavers", "socket": "initial_accounts" },
"source": { "node": "simulate_customer_transactions", "socket": "simulated_accounts" }
},
{
"target": { "node": "simulated_accounts" },
"source": { "node": "simulate_joiners_and_leavers", "socket": "simulated_accounts" }
}
]
}}
}
search.json¶
{
"objectType": "FLOW",
"search": { "logical": {
"operator": "AND",
"expr": [
{ "term": {
"attrName": "flow_type",
"attrType": "STRING",
"operator": "EQ",
"searchValue": { "stringValue": "account_simulation" }
}},
{ "term": {
"attrName": "brand",
"attrType": "STRING",
"operator": "IN",
"searchValue": { "arrayValue": {
"items": [
{ "stringValue": "ACME Financial" },
{ "stringValue": "ACME SubCo" },
{ "stringValue": "ACME Legacy Brands" }
]
}}
}},
{ "logical": {
"operator": "OR",
"expr": [
{ "term": {
"attrName": "last_review_date",
"attrType": "DATE",
"operator": "GE",
"searchValue": { "dateValue": { "isoDate": "2019-10-01" }}
}},
{ "term": {
"attrName": "review_exemption",
"attrType": "BOOLEAN",
"operator": "EQ",
"searchValue": { "booleanValue": true }
}}
]
}}
]}
}
}