How can we achieve pagination in a SOAP request?

Shaji_Kalidasan
Tera Guru

How can we overcome the default hard-limit of 250 records for a single SOAP request? If so, how can we achieve it using pagination or through other means? Please share an example of pagination using SOAP if applicable.

Here is the endpoint

https://example.service-now.com/u_custom_cmdb_ci_server.do?SOAP

Here is the payload

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<getRecords xmlns="http://www.service-now.com/u_custom_cmdb_ci_server">

</getRecords>
</Body>
</Envelope>

Note: I am using SoapUI to test this scenario

 

1 ACCEPTED SOLUTION

Hi Ankur,

We were able to overcome the hard-limit imposed by ServiceNow by using the following option

https://example.service-now.com/u_igar_cmdb_ci_server.do?SOAP

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<getRecords xmlns="http://www.service-now.com/u_igar_cmdb_ci_server">
<__limit>1000</__limit>
<__first_row>0</__first_row>
<__last_row>500</__last_row>
</getRecords>
</Body>
</Envelope>

This approach returned 500 records.

However, I am marking your suggestion to migrate to REST API as helpful.

Thank you.

Best Regards,
Shaji Kalidasan

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Shaji 

The limit is imposed because of particular reason.

I don't think pagination exists for SOAP.

refer link below

Retrieve a large number of records using SOAP

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

Thank you for your reply.

Is there any way we can overcome the hard-limit imposed on SOAP requests by activating the system property or anything as such?

Any help is highly appreciated.

Best Regards,
Shaji Kalidasan

@Shaji 

I don't think so.

You can better migrate to REST based API where you have that capability.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

We were able to overcome the hard-limit imposed by ServiceNow by using the following option

https://example.service-now.com/u_igar_cmdb_ci_server.do?SOAP

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<getRecords xmlns="http://www.service-now.com/u_igar_cmdb_ci_server">
<__limit>1000</__limit>
<__first_row>0</__first_row>
<__last_row>500</__last_row>
</getRecords>
</Body>
</Envelope>

This approach returned 500 records.

However, I am marking your suggestion to migrate to REST API as helpful.

Thank you.

Best Regards,
Shaji Kalidasan