2.2.6.3.2.3 Entity Set (as a Verbose JSON Array) with Functions
Applies to the OData 3.0 protocol
In OData 3.0, the functions name/value pair MAY be included as a property JSON object that is the value of the optional "__metadata" JSON object. The value of the functions name/value pair is a JSON object that contains name/value pairs for each function that the server advertises as bindable to the definition of the feed.
For each function, the name MUST be the function metadata URL (section 2.2.1.4.1) that identifies the function or a set of bindable function overloads and the value MUST be an array of JSON objects. Any number of JSON objects is allowed in this array. Each object in this array MUST have a least two name/value pairs: title and target. The order of these name/value pairs is insignificant.
The target name/value pair MUST be included and MUST contain a URL. This is the URL to which clients issue an Invoke Function request (section 2.2.7.5.2) to invoke the function. The binding parameter is assumed to be bound to the encompassing feed definition. Therefore, if the client invokes the function, the invoke request URL MUST not include a value for the binding parameter by appending the value as a parameter to the target URL.
The title name/value pair MUST be included and MUST contain a simple string that is used as a simple but not necessarily unique name for the function. Generally, servers SHOULD specify a value that would be easily understood by any user because the title is likely to be used by clients to display options to an end user.
The function metadata URL MUST identify only functions that are bindable to the current feed definition. If overloads exist that cannot be bound to the current feed definition, individual m:Function elements SHOULD be returned that each have a function metadata URL that identifies a specific bindable overload.
Functions advertised in the feed MUST be interpreted as being bound to the definition of the feed and not to the items that are represented in the feed.
Functions that are advertised in the feed MUST only be advertised if the server can fully encode the function, the resource path, and the appropriate system query options (section 2.2.3.6.1) that define the feed.
System query options (section 2.2.3.6.1) that change the membership of the feed MUST be considered part of the feed definition. In practice, this means that the target URL used to invoke the function MUST encode the following system query options if they are used to define the feed:
The remaining system query options, generally do not define the feed and do need not to be encoded in the target of the function: