Symptom
- How to ensure a specific number of records is returned by the SFAPI query
- How to restrict the number of records returned by the API
Environment
Successfactors
Resolution
There is a parameter named: 'maxRows' which can be utilized to ensure only the specified number of records are returned in the API response.
The parameter is used as follows:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header/>
<S:Body>
<query xmlns="urn:sfobject.sfapi.successfactors.com" xmlns:ns2="urn:fault.sfapi.successfactors.com">
<queryString>SELECT .... </queryString>
<param>
<name>maxRows</name>
<value>200</value>
</param>
</query>
</S:Body>
</S:Envelope>
Now in the query response of above api call, only 200 records or less will be returned.
In order to fetch all the records, the value of the parameter maxRows should be set as -1.
Keywords
SFAPI query parameter, maxRows, api query to return a fixed number of records, restrict the number of records , KBA , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-INT , Integrations , How To