Get Report API - Additional fields
Hi,
I am making a get report api call to fetch the reports created after a certain date
https://api.smartsheet.com/2.0/reports?modifiedSince=2024-08-01T00:00:00Z
This is the reponse i get
There are some additional fields i want in the data array
like modifedAt, etc, these are mentioned in the response in the api documentation. How do i get these additional fields??
Answers
-
Hi @sskohli
I believe the information on the right as an example is misleading - if you take a look at the Data "Array of Objects" in the documentation it states that only the following are returned:
List of Report Objects limited to the properties, id, accessLevel, name, and permalink.
I would suggest using the Get Reports to get an array of the Report IDs that you want, then you can loop through and get each individual Report to find the detail you want.
Cheers,
GenevieveNeed more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Smartsheet responses have something I call "short horizon" this means, List_Reports, List_Sheets, List_Workspaces, List_<any object> will give you a very trivial list of information and won't include any more than a name and ID you can use for your real purpose. As Genevieve mentioned, the information is misleading, but not because you post it wrong, I think is because the documentation is very vague and unclear, why ? well it also happened to me.
For SS API you need to get used to the "list first" "get more later" method. It has the advantage of keeping SS responses light unless you ask for a heavy object, like a sheet or a report in this case. Unfortunately it will also add way more calls than needed in some cases, for instance, you wan to know if you have reached the bottom level of a folder structure (the deepest folder), instead of making a single call for folders and see the whole structure, you need to make a new call for each level, workspace, folder, sub folder, sub-sub folder and so on. This causes way more calls than SS would like to, but there is no workaround.
Eventually you get used to the method and you could create code helpers that can take care of it automatically.
Sorry for my rant but it is something I consider important to communicate.
-
Thanks Alex and Genevieve for your responses.
I tried using the python equiv function of the api
self.smartsheet_client.Reports.list_reports(modified_since='2024-08-01T00:00:00Z', include_all=True)
https://api.smartsheet.com/2.0/reports?modifiedSince=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
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 460 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 461 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives