Oracle® Beehive RESTful Web Services API Reference Release 2 (2.0.1.7) E16658-04 |
When retrieving a large set of objects, such as the e-mail messages in a user's inbox, instead of retrieving the entire object, retrieve the minimum amount of information required to uniquely identify each object in the set. For example, you may retrieve only the EIDs of the e-mail messages in a user's inbox.
In general, follow these steps to more efficiently retrieve a large set of objects:
In the /list
method, specify how you want to filter and sort the list results in the
request payload. For example, the EmailMessage resource list method, /emsg/list
takes as its request payload an object of type predicateAndSortListParameters
.
In this object, you may specify the sort criteria of the list result
with an object that inherits from sortCriteria
.
(Note that sortCriteria
is an abstract type. It cannot directly be used; one of its subtypes
must be used instead.)
The following example is a
JSON request payload that lists e-mail messages in a folder (whose EID
is specified by the parent
parameter) and sorts them by delivered time:
The Web service returns the lightest object possible, such as a list of EIDs.
In your client, call the /read
method with an appropriate projection, depending on how much
information the end user requires.
By default, the maximum number
of objects you may retrieve with the /read
method is 100. If you attempt to retrieve more than this minimum, you
will encounter an error message similar to the following:
<obr:batchSizeExceededFailure xmlns:obr="http://www.oracle.com/beehive/rest">
<httpStatusCode>400</httpStatusCode>
<actualNumberOfIds>130</actualNumberOfIds>
<maxBatchSize>100</maxBatchSize>
</obr:batchSizeExceededFailure>
Retrieve the value of the
maximum batch size by calling the /sys/config
method.
Change the maximum batch size
by running the following beectl
commands, where <new value>
is the new maximum batch size you want to specify:
beectl modify_property --component _MauiService:PublicProperties --name MaxBatchSize --value <new value>
beectl activate_configuration
|
Top |