API returns less than the number of records specified in sys_parm_limit

knd46
Kilo Contributor

When running the API to extract data for certain tables like CMDB_CI and sysapproval_approvers we get less records than the number specified in the sys_parm_limit parameter. When we specifiy 1 it returns 0, for 10 it returns 1 record etc. It's not that the number of records requested is higher than the ones available in the table because if we increase the sys_parm_limit we get more, just not the number specified. 

Thank you!

3 REPLIES 3

Allen Andreas
Administrator
Administrator

Hi,

Can you share more of all your parameters? Are you using any offset? Something doesn't sound right with what you've mentioned thus far.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Thank you Allen. Here is the API call that our data engineer used: 

 

https:/mycompany/api/now/table/sysapproval_approver?&sysparm_limit=100&sysparm_exclude_reference_lin...

 

I just ran it though adding source_table = sc_req_item and got the 100: 

 

https:/mycompany/api/now/table/sysapproval_approver?table=sc_req_item&sysparm_limit=100&sysparm_exclude_reference_link=true&sysparm_display_value=true

 

I wish though that this would work properly without specifying the source_table as a parameter. How would it work for CMDB_CI

 

Thank you!

Hi @knd46 ,

 

The Links you provided require authentication its better if you share your API or in REST Outbound message check for the offset and limit and hasmore value that might give you some idea.

 

Please mark this as correct answer and helpful, if this helps you.

Regards,

Aditya