How can I connect to SNOW and run any report using a shell script?

smitapd
Kilo Explorer

How can I connect to SNOW and run any report using a shell script?

3 REPLIES 3

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

Hi Smita,



You can use SOAP for querying table with Perl/Python scripting, but I've not used it with shell scripting.



More information on SOAP with Perl/Python:



SOAP Direct Web Service API - ServiceNow Wiki


Perl Web Services Client Examples - ServiceNow Wiki


Python Web Services Client Examples - ServiceNow Wiki



Regards,


Sergiu


Andre Moreira
Kilo Expert

Hi Smita,



To connect with ServiceNow instances through Shell, you can try to use the follow article:




Where we have an example using Curl to access the ServiceNow, using the Table API feature.



So finally you can use other Linux tools and libraries to match   your needs.



Notes: Maybe you can try to looking for some library in NodeJS, Python or Ruby to do the same work by CLI.



[]'s


Andre Moreira


Hello Andre,



Thanks a ton for your suggestion! I was using CURL, but it's giving me below error:


curl: (3) <url> malformed


curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:


error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed



I also tried "-cacert" option after downloading the certificate still the same issue. I am not sure why is it saying "<url> malformed", for that matter I enclosed url in double quotes also but no help. request you to kindly help me out.



Regards,


Smita