Invoking Actions with Complex Data Type Parameter
Introduction¶
In OData actions, structure type parameters should be represented using JSON Objects in the request payload.
Example¶
Following request is to “ActionStructBindTestUb” action which has RootStruct Complex Typed parameter.
http[s]://{host}:{port}/{main|b2b}/ifsapplications/projection/v1/Operations.svc/ActionStructBindTestUb
The request payload should be as follows.
With All Attributes¶
{
"StructPara": {
"RootAlpha": "Alpha1",
"RootBoolean": true,
"RootDate": "2018-10-01",
"Children": [
{
"Level1Integer": 1,
"Level1Enum": "Car",
"Child": {
"Level2Number": 1.95,
"Level2Text": "Text1"
}
},
{
"Level1Integer": 3,
"Level1Enum": "Suv",
"Child": {
"Level2Number": 3.69,
"Level2Text": "Text2"
}
}
]
}
}
With Some Attributes¶
{
"StructPara": {
"RootAlpha": "Alpha1",
"RootDate": "2018-10-01",
"Children": [
{
"Level1Integer": 1,
"Level1Enum": "Car",
"Child": {
"Level2Number": 1.95
}
},
{
"Level1Integer": 3,
"Level1Enum": "Suv"
}
]
}
}