How to fetch table records through rest api?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2019 09:44 AM
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.
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2019 09:55 AM
What interface are you using? I just typed your URL where you got the tag mismatch into the address bar in Chrome and it returned all the Windows Server records in my instance. I'm wondering if maybe the tool you're using is appending something to the URL you can't see.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2019 04:26 AM
Hi Ron/ All,
I also tried below scenarios but still not able to understand what is the root cause, why m not getting any response on below query.
https://instance.service-now.com/api/now/table/cmdb_ci_win_server
When I'm trying for cmdb_ci_linux_server table, then its working fine. but not for win table.
But for this URL I'm getting below error. "Error on Line53 at column number"
https://instance.service-now.com/api/now/table/cmdb_ci_win_server
When I'm trying the order by DESC query then I'm getting below error. "Error on Line69 at column number"
https://instance.service-now.com/api/now/table/cmdb_ci_win_server?sysparm_query=ORDERBYDESCname
When I'm trying the order by query then I'm getting below error. "Error on Line 53 at column number"
As per my understanding its look likes data issue in 'cmdb_ci_win_server' table but I'm not 100% sure, if data issue but how i can fix it? or any other issues?
Also When I'm trying below query with fields I'm getting response. In this table there are total 123 fields, and i tried with all attributes and getting response.
https://instance.service-now.com/api/now/table/cmdb_ci_win_server?sysparm_fields=name%2Cu_active%2Cshort_description%2Cserial_number%2Clocation%2Cu_ci_comments
Could anyone pls help? how to resolve this issue?
Thanks,
Mehak

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2019 04:28 AM
where exactly are you testing it ?
did you try on rest api explorer and is it giving you the correct count ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2019 04:35 AM
No Harsh, I'm testing on browser.