Is it possible to write a script to create a change request externally?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2017 12:13 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2017 01:15 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2017 01:18 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2017 01:56 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2017 06:36 PM
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