2.2.7.5.2 Invoke Function Request

Applies to the OData 3.0 protocol

The purpose of the Invoke Function request is to enable a client to call a FunctionImport, as specified in [MC-CSDL] section 2.1.15, that is exposed as a function (section 2.2.1.4) in a data service.

An Invoke Function request MUST use the HTTP GET method. Additionally, the URI specified by the client in the HTTP request line MUST be a URI that identifies one or more functions, as described in Resource Path: Semantics (section 2.2.3.5).

If the FunctionImport element(s), as specified in [MC-CSDL], that is exposed by one or more functions requires input parameters other than the binding parameter, those parameters MUST be provided, as specified in Function Parameters (section 2.2.3.6.4).

If the Invoke Function request is not successful (for example, an error occurred during the request processing), the response MUST be formatted according to Error Response (section 2.2.8.1).

The syntax of an Invoke Function request is defined as follows:

 invokeFunction-Req    = invoke-ReqLine
                         invoke-ReqHeaders
                         CRLF
  
 invoke-ReqLine        = "GET"
                         SP functionUri invoke-QueryOps
                         SP HTTP-Version
                         CRLF
  
 invoke-ReqHeaders     = [DataServiceVersion]        ; see section 2.2.5.3
                         [MaxDataServiceVersion]     ; see section 2.2.5.7
                         *(HTTP-Header-Types)
  
 functionUri           = <Any Resource Path identifying one or more Functions>
                         ; see section 2.2.3 and section 2.2.3.5
  
 invoke-QueryOps       = ["?" (sysQueryOption / customQueryOption / serviceOpParam)
                         *("&" (customQueryOption / serviceOpParam) )]
                         ; see section 2.2.3.1 & section 2.2.3.6.3

The syntax of a response to a successful Invoke request is defined as follows:

 invokeFunction-Resp = invoke-Resp 
                       ; see section 2.2.7.5