In OData functions, parameter aliases need to be used to represent structure type parameter values. The value for the alias must be specified as a separate query option using the name of the parameter alias.
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, please follow the links below.
Following requests are for the FunctionStructBindTestUb
function which has the RootStruct
structure parameter.
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" } } ] }
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" } ] }
function FunctionStructBindTestUb Text { parameter StructPara Structure(RootStruct); }
Example code - Marble function
structure RootStruct { attribute RootAlpha Alpha; attribute RootDate Date; attribute Children List<Structure(Level1Struct)>; } structure Level1Struct { attribute Level1Integer Integer; attribute Level1Enum Enumeration(VehicleType); attribute Child Structure(Level2Struct); } structure Level2Struct { attribute Level2Number Number; attribute Level2Text Text; }
Example code - Marble structure