How can my script determine the version of ServiceNow that is running?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2015 04:48 PM
As the title says ... we use the Table API extensively and need a way to programmatically determine the ServiceNow version (we are running both Eureka and Fuji in different environments). Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2015 05:58 PM
There is an InstanceInfo.do?WSDL that you can query to get your version. You can look at it in your Scripted Web Services module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2015 10:21 AM
This sounds like the way to go but for some reason, I can't get a response from that SOAP endpoint. I haven't used these scripted web services before so I'm probably missing something.
>>> from suds.client import Client >>> url = 'REDACTED' >>> client = Client(url) >>> print str(client.service.execute()) None
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2015 12:28 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2015 06:03 PM
There is probably a better way, but this comes to mind.
If your instance has been upgraded at least once, you could query the upgrade history table as follows:
var gr = new GlideRecord('sys_upgrade_history');
gr.addEncodedQuery('from_version!=n/a');
gr.setLimit('1');
gr.orderByDesc('upgrade_finished');
gr.query();
if (gr.next()) {
gs.print(gr.to_version);
}
Alternatively, you could parse the stats.do page for the build details.
Build name: HEAD (Fuji)
Build date: 05-14-2015_0900
Build tag: glide-fuji-12-23-2014__patch4-05-06-2015
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022