Python equivalent of API doesn't give the same result
I tried using the python equivalent function of the api
https://api.smartsheet.com/2.0/reports?modifiedSince=2024-08-01T00:00:00Z&include_all=True
as
self.smartsheet_client.Reports.list_reports(modified_since='2024-08-01T00:00:00Z', include_all=True)
This time it's giving me all the reports 360 of it, why didn't the python function limit the reports to just after the date provided?
thanks,
Sandeep
Answers
-
There's not too many on here that do Python. I'm afraid I don't either but I didn't want you left hanging. I only have a couple of suggestions that might be dumb, as I'm not super familiar with Python.
If these don't cut it, then I'd suggest reaching out to your account rep and see if they can get someone from the development team to connect with you or identify this as a bug. Also check through the Developers site to see if there's any helpful info there.
- Does the date need to be in quotes? Maybe try without?
- Why include_all ? Try removing that perhaps and see if you get a different result?
- Why self.smartsheet_client instead of just smartsheet_client as in the documentation?
- I saw some alternative documentation that had the arguments in this format (modified_since, '2024-08-01T00:00:00Z'). Maybe try that instead of =
- In the sample script here the format of the call is completely different than the API documentation. In this example they use smartsheet.Smartsheet().Sheets.get_sheet(…) not self.smartsheet_client.Sheets.get_sheet(…) so maybe you need this other format? Confusing!
If none of that works or even makes sense, then I'm afraid I don't have other ideas for you.
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives