Search code examples
c#.netc#-4.0servicenow

How to add limit parameter in the soap request url?


My aim is to get all records from a table in ServiceNow. By default, I am able to get 250 records. But I need to get all the records. I learnt from here that we can set the limit in the soap request url.

Code:

var url = "https://*****.service-now.com/rm_story.do?SOAP";

Additional code in getting records for reference

I added the limit parameter to the above url as

https://*****.service-now.com/rm_story.do?&limit=300&SOAP.

Even though, I am getting same 250 records.

Is this the correct way to add limit ? If not, how to add limit in the SOAP request url in ServiceNow? Thanks.


Solution

  • The _limit parameter must be passed in the body of the http request not the url. See answer to ServiceNow - Getting all records for example http request to ServiceNow SOAP API using _limit parameter.