Using the PageSize Parameter for Parent/Child/Grandchild Records

Inbound REST queries can set the limit for the number of records returned from a query for every level of the hierarchy. To do this, add the PageSize parameter with an integer as its argument at the desired level in the request.

Example 1

In this request the PageSize parameter is set at the parent level (since there is only one level in this request). This limits the response to 2 Account records.

  • URI: https://ServerName:port/siebel/v1.0/data/Account/Account?Fields=Id&Childlinks=None&StartRowNum=0&PageSize=2

  • HTTP Method: GET

  • Content-Type: application/json

  • Authorization: Basic

  • Request Body: None

Example 2

In this request for Contacts for a particular Account record, the PageSize parameter is set at the child level to 2 for the Contacts.

  • URI: https://ServerName:port/siebel/v1.0/data/Account/Account/1-34Z/Contact?Fields=First Name, Last Name&Childlinks=None&StartRowNum=0&PageSize=2

  • HTTP Method: GET

  • Content-Type: application/json

  • Authorization: Basic

  • Request Body: None

Example 3

This request gets the Actions for Contacts that belong to an Account. Here, we are restricting the response to two Activity records for a particular Contact. This parameter is at the grandchild level with page size for grandchild.

  • URI: https://ServerName:porthttps://<ServerAddress>:<port>/siebel/v1.0/data/Account/Account/1-34Z/Contact/1LS-AF98/Action?StartRowNum=0&PageSize=2

  • HTTP Method: GET

  • Content-Type: application/json

  • Authorization: Basic

  • Request Body: None

Limiting the Maximum Records Per Page for an Inbound REST Request

An inbound REST request may query for many records. You can specify that each page of data has only a certain number of records by using the query parameter PageSize. A typical value is 10 and the default limit is 100 records per page. If you wish to increase the number of records retrieved within any page of data beyond the default limit of 100 then specify a value for the Maximum Page Size (MaximumPageSize in Server Manager) parameter for the EAI Object Manager. Only set this parameter on Object Managers that handle inbound REST requests such as the EAI Object Manager. You can set this to, for example, allow 10,000 records to be retrieved in a single page of a REST response.

Note: Carefully consider using this parameter to increase the maximum records from the default (100) to a larger number of records returned from an inbound REST request. If the memory and CPU on the Siebel Server machine are constrained, you may not receive all the records you expect. The Siebel Server logs and the response will show errors like the following.
{
"ERROR": "OMRPC Request 4 was abandoned after 1749089205118 ms. Connection: f0004a(SBL-JCA-00315)"
}

Subsequent queries will show:

{
"ERROR": "OMRPC Request 191 was abandoned after ms. Connection: f00047 due to connection shutdown request null(SBL-JCA-00303)"
}

As a result of the resource constraints on the machine you may not get all the records in a single page. For instance, if you set the server parameter to 5,000, and the maximum memory is reached on the Siebel Server, you may only get the number of records that the Siebel Server can muster, which may be far less than the expected 5,000.

Steps to set the Maximum Page Size parameter in the application
  1. Log into your end user application such as Call Center.
  2. Go to Administration > Server Configuration.
  3. Query for the EAI Object Manager (or the Component you use to handle inbound REST requests).
  4. Select Parameters from the bottom Applet.
  5. Query for Maximum Page Size.
  6. Set the Default Value and Value on Restart to the number you need.
  7. Restart the EAI Object Manager.