Create table API and import it into excel

imjustanintern
Kilo Explorer

Hi, I'm extremely new to this and was wondering how I can make an API link that will get me a specific reporting from a table and how I would go around importing that table into Excel. I've tried googling it but most of the explanations go right over my head. Thanks!

1 ACCEPTED SOLUTION

Ni Nick,



https://<instance Name>.service-now.com/incident_list.do?CSV&sysparm_query=sys_created_on%3C%3Djavas...



That should do it!



edit:


Just to add some more info - I created the sys_created_on filter in the URL above, by creating the filter on the incident list, then "copy query" - as suggested by Dave Smith



If the reply was informational, please like, mark as helpful or mark as correct!


View solution in original post

7 REPLIES 7

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Le,


Not quite sure what you have in mind but how about exporting directly form the URL to csv?


https://docs.servicenow.com/bundle/helsinki-servicenow-platform/page/administer/exporting-data/task/t...



https://<instance name>.service-now.com/incident_list.do?CSV


this URL will download all incidents to a csv file - well probably up to 10 000



this URL will download to csv all incidents that have a specified caller and created before dec 1 2016


https://<instance name>.service-now.com/incident_list.do?CSV&caller_id=6816f79cc0a8016401c5a33be04be441^sys_created_on<javascript:gs.dateGenerate('2016-12-01','00:00:00')



Not what you need? How does it differ?



If the reply was informational, please like, mark as helpful or mark as correct!


Hmmm so basically I need the API in order to get access to a customer service call log table that refreshes daily. This would go through   visual studios so I can automate this and visualized in Tableau to then be uploaded on the Tableau server. I'd like to know how to import the data into excel so I can check to make sure I'm getting the right information. If there's a better way to do this please let me know!


Hi Nick,



If you have any page that diplays a list, you just need to add "&CSV" to the end of it. so for e.g. :



https://myinstance.service-now.com/nav_to.do?uri=/incident_list.do


- This lists all he incidents in your instance in a list view on he UI



https://myinstance.service-now.com/nav_to.do?uri=/incident_list.do


- This link lists all the incidents also, but the "?&CSV" on the end will export it as CSV instead of displaying. You have other options too : XML, XLSX, PDF



Cheers


Ah I see, thank you. Quick question, if I'm looking to have the API show the date shown with "at or before" yesterday, how would that look like?