Is it possible to write a script to create a change request externally?

wayneegli
Kilo Explorer

Are there examples or a way to write a script (say on a Linux server in python, or whatever language) and post/push a change request creation into ServiceNow? Perhaps using REST or something else?

I have an automated task to change a system, but I need a change request first before the automation script can execute and I want it to be fully automated.

9 REPLIES 9

venkatvraman17
Kilo Guru

You can create a change request in the system using the REST API from ServiceNow. Use REST Explorer application to identify the web service and the parameters you need to pass for creating a ticket


I'm a bit new to Servicenow so you may have to back up a little bit for me. How do I get to the REST explorer application? Is that something only my administrators would have access to? I'm more of a user/consumer of the service and create/close tickets, etc.



Any examples also? I've seen incident ticket code before so I know that part is possible...Just didn't do it myself.


Only the admins of ServiceNow will have access to this. You can read about the REST API and REST explorer here:




http://wiki.servicenow.com/index.php?title=REST_API_Explorer#gsc.tab=0


Roger Poore
Tera Guru

Absolutely.   We are doing just that with a node application we call SNBlaster.   We use it for automatically submitting change requests for patch management on our RHEL systems.



Let me know if you'd like more info.



-Roger