Skip to content

Large Parameters in Actions

When implementing APIs, there could be the need to pass in large parameters. To make sure OData Provider containers doesn’t run into out of memory issues due to extra-large parameters sent in, we limit the maximum size allowed for a single parameter to 64 KB both in Actions and Functions.

For file uploads, the supported approach is to model Stream type attributes in a Projection Entity and stream the content directly to the attribute endpoint. Stream type attributes can be modelled for both BINARY and LONG_TEXT types in entity models, so applications can transfer large payloads directly into the tables by using this mechanism.

If a large binary or text content is required to be further processed before being saved into the database tables, it is convenient to define an Action endpoint to take in the context along with other parameters. Without the absence of a direct approach to take in a Stream along with the other parameters in OData Provider, we have to do a multi-step API invocation to pass large content to Projection Actions (both Bound and Unbound).

The Steps are,

  1. Create a record inside FndTempLobs entity set and retrieve the OData-EntityID response header value
  2. Send in the Stream content into {{OData-EntityID}}/BlobData or {{OData-EntityID}}/ClobData depending on the type
  3. Call the real Action with OData-EntityID retrieved earlier, in place of the parameter you want to have the real data content. Note that the action endpoint has a slightly changed parameter name from the one you model (ParameterName -> ParameterNameTempLobId)

At the server-side Action implementation, the real data content will be available as a BLOB or CLOB depending on your Action parameter type of Binary or LongText respectively. You don’t have to worry about clearing the temporary data for fetching the content in the real Action implementation.

Refer this sample projection model and Postman collections to see this in action. Note the usage of "Tests" configuration in the first request to extract OData-EntityId and ETag as Environment Variables and their usage in the subsequent two requests.