servicenow report url
Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.
Code of Conduct .
Join Stack Overflow to learn, share knowledge, and build your career.
Email Sign Up
or sign in with
ServiceNow – How to use SOAP to download reports
I need to automate download of reports from
I’ve been able to automate it using
win32com by following method.
selenium to access
serviceNow as well as modify
firefox default download option to dump the file to a folder on
However, Since all of this may be ported to a
linux server , we would like to port it to
I came across
serviceNow libraries for
python here .
I tried it out and following code is working if I set login , password and instance-name as listed at the site using following from
class Change(Base): __table__ = 'change_request.do'
and following within clientside script as listed on site .
# Fetch changes updated on the last 5 minutes changes = chg.last_updated(minutes=5) #print changes client side script. for eachline in changes: print eachline
However, When I replace URL with
sys_report_template.do, I am getting error
Traceback (most recent call last): File "C:\Python27\lib\site-packages\SOAPpy\Parser.py", line 1080, in _parseSOAP parser.parse(inpsrc) File "C:\Python27\Lib\xml\sax\expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "C:\Python27\Lib\xml\sax\xmlreader.py", line 125, in parse self.close() File "C:\Python27\Lib\xml\sax\expatreader.py", line 220, in close self.feed("", isFinal = 1) File "C:\Python27\Lib\xml\sax\expatreader.py", line 214, in feed self._err_handler.fatalError(exc) File "C:\Python27\Lib\xml\sax\handler.py", line 38, in fatalError raise exception SAXParseException: <unknown>:1:0: no element found
Here is relevent code
from servicenow import ServiceNow from servicenow import Connection from servicenow.drivers import SOAP # For SOAP connection conn = SOAP.Auth(username='abc', password='def', instance='test') rpt = ServiceNow.Base(conn) rpt.__table__ = "sys_report_template.do?CSV" #jvar_report_id replaced with .... to protect confidentiality report = rpt.fetch_one('jvar_report_id': '92a6760a......aas') for eachline in report: print eachline
So, my question is , what can be done to make this work?
I looked on web for resources and help, but didn’t find any.
Any help is appreciated.
add a comment |
After much research I was able to use following method to get report in
csv format from
servicenow. I thought I will post over here in case anyone else runs into similar issue.
import requests import json # Set the request parameters url= 'https://myinstance.service-now.com/sys_report_template.do?CSV&jvar_report_id=929xxxxxxxxxxxxxxxxxxxx0c755' user = 'my_username' pwd = 'my_password' # Set proper headers headers = "Accept":"application/json" # Do the HTTP request response = requests.get(url, auth=(user, pwd), headers=headers ) response.raise_for_status() print response.text
response.text now has report in
I need to next figure out, how to parse the
response object to extract
csv data in correct format.
Once done, I will post over here. But for now this answers my question.
add a comment |
Not the answer you’re looking for? Browse other questions tagged python soap servicenow or ask your own question .
2 years, 3 months ago
29 days ago
Extract incident details from Service Now in Excel
How to merge two dictionaries in a single expression?
How do I check if a list is empty?
How do I check whether a file exists?
Representational state transfer (REST) and Simple Object Access Protocol (SOAP)
How can I safely create a nested directory in Python?
How do I sort a dictionary by value?
How to make a chain of function decorators?
How do I list all files of a directory?
How to pass “Null” (a real surname!) to a SOAP web service in ActionScript 3?
SOAP vs REST (differences)
Hot Network Questions
How can I make my girlfriend not to get fixated on false facts and listen for reasons?
Is it hopeless in terms of becoming decent musicians, if they can’t count beats?
I’m rarely seen by you
Why is peer review so random?
‘Caramelization’ of tomato sauce in slow cooker
Why is storing passwords in version control a bad idea?
g++ 8.1 template deduction ambiguity with std flag equal to ‘c++17’
Search for special characters using grep
Does this mathematical technique have a formal name? And why does it work?
What unit of measurement is used to indicate the warping of space
Why were floppy disks invented after hard disks?
How can I explain why my mechs don’t sink into the ground?
Sort by what the digit pairs describe
Why does Samsung include useless capacitors?
Colleague blocks change request in peer review because of perceived mistakes in code, but suggested improvements do not work
QGIS: Delete all records/rows with NULL values
What do you call the act of drinking a whole bottle of, say, water in one go?
Is it possible to start a PhD at 36 without taking a huge hit financially?
Is a pig-mounted cavalry possible?
How to Write an Eldritch Abomination?
I am what you might find in a ghost town
What is "roots and hacks"?
more hot questions
Skip to content
Automatically Filter Report Homepage
Automatically Filter Report Homepage
just figured out a cool little reporting feature today that might end up helping somebody. On the reports homepage (‘report_home.do’) in Service-now.com, users have the ability to type filter text to restrict the types of reports that they see. So, if I wanted to see just those reports on the ‘Change request’ table, I could simply type ‘change request’ for my filter text as shown below…
Now for the cool part… This filter text can actually be passed over a URL as a parameter to automatically bring a user to a filtered report homepage view. This might be useful if you wanted to create a UI action on the change request table that brought the user to the change request reports when clicked for example.
The parameter is ‘sysparm_reportquery’ and is used like this in a URL…
To navigate to the report homepage without navigation (filtering on ‘change request’)
To navigate to the report homepage with navigation (filtering on ‘change_request’)
Filtering on additional report attributes with a hidden background filter
You can also use the regular ‘sysparm_query’ parameter just like you would in a module or filter definition to filter a list of records. This might be useful for filtering on other attributes on the report definition. For example, if I wanted to show a list of just Pie Chart reports in the system WITHOUT having my query appear in the filter box, I could set up my report page URL like this…
July 23rd, 2010|Categories: Reporting | 7 Comments
Share This Story, Choose Your Platform!
About the Author: Mark Stanger
He has personally led dozens of successful implementations encompassing every part of the ServiceNow platform. He is also responsible for designing and developing groundbreaking ServiceNow solutions and best practices in the form of various applications, turnkey solutions, and integrations during his tenure at ServiceNow, Crossfuze and, of course, SN | Guru. These solutions are used today by ServiceNow administrators and consultants alike in hundreds of ServiceNow instances around the world!
Harnessing the Power of Dynamic Filters in ServiceNow
Harnessing the Power of Dynamic Filters in ServiceNowSeptember 4th, 2015
Identify which ServiceNow Record Producer was used to create a record
Identify which ServiceNow Record Producer was used to create a recordJanuary 22nd, 2015
Building a CI Change Calendar Macro – On The Fly
Building a CI Change Calendar Macro – On The FlyJuly 20th, 2011
Restrict Report Table Selection by Role
Restrict Report Table Selection by RoleDecember 20th, 2010
Group Member Counts Reports
Group Member Counts ReportsJuly 21st, 2010
November 24, 2011 at 1:33 am – Reply
It’s helpful. 🙂
I wonder what I could put in query if I wanted something from filter.
for example filter is
Stage is achieved
- Mark Stanger
November 26, 2011 at 10:03 am – Reply
You can do that as long as you target a specific report using the ‘sysparm_query’ parameter. I’ve built an example of this using a calendar report in a popup. Check out this post for details.
May 5, 2012 at 10:25 am – Reply
Is there any way we can sort reports page in alphabetical order of Tables?
- Mark Stanger
May 5, 2012 at 12:57 pm – Reply
No way that I’m aware of. The report page can’t really be modified unfortunately.
June 23, 2014 at 6:45 am – Reply
Is there a way to make the url something dymanic, i.e. only show reports where the current user has permissions to see them?
- Mark Stanger
June 23, 2014 at 6:51 am – Reply
You’re pretty much limited to a text filter as far as I know. Displaying only reports where the user has permissions is the standard behavior though so you shouldn’t need anything different to do that.
October 8, 2015 at 4:56 am – Reply
Very good trick guys.
But on some instance it doesn’t seem to work.
Any idea why? Is there any system properties about this?
Leave A Comment Cancel reply
- GlideRecord Query Cheat SheetFebruary 23rd, 2010
- Client Server Code in One UI ActionAugust 31st, 2010
- User Object Cheat SheetFebruary 25th, 2010
- WEBINAR: Change Management Turnkey: Top 3 Ways to Turn Organizational Change into a Positive ExperienceAugust 3rd, 2017
- How to Transform Customer Service Management at Warp SpeedMay 22nd, 2017
- The Final ‘Work Note’ – Goodbye From ServiceNow GuruMay 5th, 2017
Sai says:@sannthosh Did you solve the same for UI16
Tanay Bedia says:Please increase Max length gradually from 18 to 21 and then to…
Tanay Bedia says:Looks like the default value of max length for Decimal type fields…
Catalog client scripts
Crossfuze Blog Updates!
- 6 Reasons Why Amazing Customer Service is Critical to Your Long-term Marketing June 12, 2017Do you know why companies like Amazon, Zappos, Southwest Airlines, or the plumber in the next town keep getting more business from consumers like us? The answer is quite simple. It’s because they provide exceptional customer service every chance possible. Their entire brand is built on the promise of great service. Sounds easy, right? On […]
- Crossfuze Releases New Guidebook for IT Leaders, 10 Pillars of ServiceNow Success for CIOs May 19, 2017We are excited to announce the official release of our new book, 10 Pillars of ServiceNow Success for CIOs. The book is an educational resource to guide CIOs and their teams on their journey to transforming their organizations using ServiceNow. The 75-page book discusses best practices derived from more than 500 ServiceNow implementations—all aimed at […]
- Attack the Costly “Complexity of Things” with Elegant Enterprise Services March 21, 2017Famous leaders on the world stage have struggled to articulate a vision to gain the kind of mass support that changes history. Without a clear and consistently communicated vision, momentum for the cause…
- 10 Pillars of ServiceNow Success for CIOs – Pillar 10: Creating a fully integrated ServiceNow ecosystem March 21, 2017Welcome to Part X of Crossfuze’s 10 Pillars of ServiceNow Success for CIOs blog series! First, a story to illustrate the challenge of fully integrating your ServiceNow ecosystem: Kyle is an experienced CIO…
- 10 Pillars of ServiceNow Success for CIOs – Pillar 9: Strategizing to manage demand March 16, 2017Welcome to Part IX of Crossfuze’s 10 Pillars of ServiceNow Success for CIOs blog series! First, a story about the universal, pervasive challenge of demand management: Jason is a veteran CIO who has made many friends and allies within his company by being a “yes man.” He bends over backward to fulfill everyone’s IT service […]