Invoking Functions with Complex Data Type Parameter
Introduction¶
In OData functions, parameter aliases should be used to represent structure type parameter values. The value for the alias should be specified as a separate query option using the name of the parameter alias.
Parameter Aliases¶
Parameter aliases MUST start with an @ character and its value MUST be specified either as a URL literal (for primitive values) or as a JSON formatted OData object (for complex values, or collections of primitive or complex values).
For more details about parameter aliases, follow the links below.
Example¶
Following requests are for the FunctionStructBindTestUb
function which has the RootStruct
structure parameter.
With All Attributes¶
http[s]://{host}:{port}/{main|b2b}/ifsapplications/projection/v1/Operations.svc/FunctionStructBindTestUb(StructPara=@Alias1)?@Alias1={ "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¶
http[s]://{host}:{port}/{main|b2b}/ifsapplications/projection/v1/Operations.svc/FunctionStructBindTestUb(StructPara=@Alias1)?@Alias1={ "RootAlpha": "Alpha1", "RootDate": "2018-10-01", "Children": [ { "Level1Integer": 1, "Level1Enum": "Car", "Child": { "Level2Number": 1.95 } }, { "Level1Integer": 3, "Level1Enum": "Suv" } ] }