Skip to content

Recommendations for REST API RequestsΒΆ

When modeling an action that includes a structure array as a request parameter in a REST API, there are certain recommendations that the developers should keep in mind.

The maximum size recommended for a request depends on the memory limit of the OData server used.

For an OData server with a memory limit of 2500MB, it is recommended to keep the maximum number of elements including all the arrays as 5000 per request. Requests exceeding this limit of array elements can result in a failure, indicated by a 500 status code.

Consider the following examples which we used action requests which includes structure array parameters. Each structure used in this array has 150 string attributes.

  1. Example 1:

Here we use one structure array as a request parameter. The structure array includes 5000 elements.

img_1.png

request is successful:

img_2.png

The memory consumed by this request is shown as follows:

img_3.png

  1. Example 2:

Here we use two structure arrays as request parameters. Each structure array includes 2500 elements.

img_4.png

request is successful:

img_5.png

The memory consumed by this request is shown as follows:

img_6.png

  1. Example 3:

Here we use ten structure arrays as request parameters. Each structure array includes 500 elements.

img_7.png

request is successful:

img_8.png

The memory consumed by this request is shown as follows:

img_9.png