How to fetch table records through rest api?

mehak1890
Tera Expert

Dear All,

I'm not able to fetch all table records from one table. For e.g i tried below queries.

https://instance.service-now.com/api/now/table/cmdb_ci_win_server?sysparm_limit=100

For above query m getting records but i want to fetch all records so tried -1 or blank but getting error page.

https://instance.service-now.com/api/now/table/cmdb_ci_win_server?sysparm_limit=-1 

throwing error "Invalid value given for sysparm_limit"

https://instance.service-now.com/api/now/table/cmdb_ci_win_server

throwing error as well. "Opening and ending tag mismatch:"

 

Could anyone pls help how to fecth all records from one table? Thansk, Mehak.

 

 

6 REPLIES 6

ohk..

i tried the below url which you had added the orderby and it's working on my PDI. 

https://dev34768.service-now.com/api/now/table/cmdb_ci_win_server?sysparm_query=ORDERBYDESCname

 

find_real_file.png

 

 

 

Ron Legters
ServiceNow Employee
ServiceNow Employee

At this point, if I were you, I would open a ticket with support. The fact that the same query works on one table and not another suggests that there's corruption in the table it's not working on, and I don't you can fix that yourself. 

Sorry.